From 6894a50e2ee833222d7714c75892a8c1a7b77784 Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Tue, 24 Dec 2024 16:48:32 +0100 Subject: [PATCH] Update tsconfig according to sindresorhus/electron-store#276 --- src/main/index.ts | 2 +- tsconfig.node.json | 30 +++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 9f26621..1216049 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -27,7 +27,7 @@ function createWindow(): void { autoHideMenuBar: true, ...(process.platform === 'linux' ? { icon } : {}), webPreferences: { - preload: join(__dirname, '../preload/index.js'), + preload: join(__dirname, '../preload/index.mjs'), sandbox: false } }) diff --git a/tsconfig.node.json b/tsconfig.node.json index db23a68..d405487 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -3,6 +3,34 @@ "include": ["electron.vite.config.*", "src/main/**/*", "src/preload/**/*"], "compilerOptions": { "composite": true, - "types": ["electron-vite/node"] + "types": ["electron-vite/node"], + "outDir": "${configDir}/distribution", + "module": "node16", + "moduleResolution": "node16", + "moduleDetection": "force", + "target": "esnext", + "lib": [ + "DOM", + "DOM.Iterable", + "ES2022" // Node.js 18 + ], + "resolveJsonModule": false, // ESM doesn't yet support JSON modules. + "jsx": "react", + "declaration": true, + "newLine": "lf", + "stripInternal": true, + "strict": true, + "noImplicitReturns": true, + "noImplicitOverride": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noPropertyAccessFromIndexSignature": true, + "noUncheckedSideEffectImports": true, + "noEmitOnError": true, + "useDefineForClassFields": true, + "forceConsistentCasingInFileNames": true, + "skipLibCheck": true } }