From cb4d6357f7ba86d21f2cff0551509b3cc22e76db Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sun, 11 Jun 2023 16:23:06 -0500 Subject: [PATCH] fix: ts module resolution and revert style --- template-js/src/index.js | 3 +-- template-ts-esm/tsconfig.json | 28 ++++++++++++++-------------- template-ts/src/index.ts | 2 +- template-ts/tsconfig.json | 26 +++++++++++++------------- 4 files changed, 29 insertions(+), 30 deletions(-) diff --git a/template-js/src/index.js b/template-js/src/index.js index 925cc44..aef4fd5 100644 --- a/template-js/src/index.js +++ b/template-js/src/index.js @@ -33,5 +33,4 @@ async function init() { }); } -init(); -client.login(); +init().then(() => client.login()); diff --git a/template-ts-esm/tsconfig.json b/template-ts-esm/tsconfig.json index 25e2f20..67cd8fd 100644 --- a/template-ts-esm/tsconfig.json +++ b/template-ts-esm/tsconfig.json @@ -1,16 +1,16 @@ { - "compilerOptions": { - "moduleResolution": "nodenext", - "resolveJsonModule": true, - "target": "ESNext", - "module": "ESNext", - "outDir": "dist", - "rootDir": "src", - "strict": true, - "esModuleInterop": true, - "noImplicitAny": true, - "strictNullChecks": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true - } + "compilerOptions": { + "moduleResolution": "node", + "resolveJsonModule": true, + "target": "ESNext", + "module": "ESNext", + "outDir": "dist", + "rootDir": "src", + "strict": true, + "esModuleInterop": true, + "noImplicitAny": true, + "strictNullChecks": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + } } diff --git a/template-ts/src/index.ts b/template-ts/src/index.ts index eef4a50..fce5488 100644 --- a/template-ts/src/index.ts +++ b/template-ts/src/index.ts @@ -32,4 +32,4 @@ async function init() { }); } -client.login(); +init().then(() => client.login()) diff --git a/template-ts/tsconfig.json b/template-ts/tsconfig.json index 7da08ce..b6cd170 100644 --- a/template-ts/tsconfig.json +++ b/template-ts/tsconfig.json @@ -1,15 +1,15 @@ { - "compilerOptions": { - "resolveJsonModule": true, - "target": "ESNext", - "module": "CommonJS", - "outDir": "dist", - "rootDir": "src", - "strict": true, - "esModuleInterop": true, - "noImplicitAny": true, - "strictNullChecks": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true - } + "compilerOptions": { + "resolveJsonModule": true, + "target": "ESNext", + "module": "CommonJS", + "outDir": "dist", + "rootDir": "src", + "strict": true, + "esModuleInterop": true, + "noImplicitAny": true, + "strictNullChecks": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true + } }