From 9e2d253fb649d9df3c3b91265fc0f127364b9a73 Mon Sep 17 00:00:00 2001 From: "Arthur E. Jones" Date: Thu, 5 May 2022 15:26:16 -0500 Subject: [PATCH] fix: correct tsconfig for node.js - specify module type, resolution, and interop. this package runs under nodejs, not a browser environment, and needs ts to be configured accordingly. --- tsconfig.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index f659e6c..9191b3c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,6 +4,7 @@ // DOM for URL global in Node 16+ "lib": ["ES2021", "DOM"], "allowSyntheticDefaultImports": true, + "esModuleInterop": true, "experimentalDecorators": true, "resolveJsonModule": true, "downlevelIteration": true, @@ -11,10 +12,9 @@ // Check JS files too "allowJs": true, "checkJs": true, - // Used for temp builds - "outDir": "build", - "moduleResolution": "Node", - "module": "ESNext" + "moduleResolution": "node", + "module": "commonjs", + "outDir": "build" }, "exclude": ["node_modules", "build", "./app-plaid.js"] }