Skip to content

Commit 138d37a

Browse files
committed
chore(preload): simplify tsconfig and update build command
1 parent bde56b0 commit 138d37a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

electron/preload/tsconfig.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
{
22
"compilerOptions": {
3-
"composite": true,
4-
"rootDir": "..",
53
// Eletron does not support ESM in preload scripts in sandboxed renderers.
64
// So this package is compiled down to ES6 as commonjs.
75
// https://www.electronjs.org/docs/latest/tutorial/esm
86
"target": "ES6",
97
"module": "CommonJS",
108
"moduleResolution": "Node",
9+
"baseUrl": ".",
1110
"outDir": "../build", // creates 'preload' and 'common' subfolders
12-
"declaration": true,
13-
"declarationDir": "./",
11+
"declaration": false,
1412
"sourceMap": true,
1513
"inlineSources": true,
1614
// Set `sourceRoot` to "/" to strip the build path prefix

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"start:dev": "yarn build:dev && APP_ENV=development electron ./electron/build/main/index.js",
5252
"build:common": "yarn clean && tsc -p electron/common",
5353
"build:main": "yarn clean && tsc -p electron/main",
54-
"build:preload": "yarn clean && yarn tsc -p electron/preload --declarationDir ../build/preload && tsc -p electron/preload --isolatedModules null --declarationDir null --emitDeclarationOnly --declaration --outFile electron/preload/index.d.ts && yarn prettier:fix electron/preload/**/*.d.ts",
54+
"build:preload": "yarn clean && yarn tsc -p electron/preload && tsc -p electron/preload --isolatedModules null --declarationDir null --emitDeclarationOnly --declaration --outFile electron/preload/index.d.ts && yarn prettier:fix electron/preload/**/*.d.ts",
5555
"build:renderer": "yarn clean && next build electron/renderer && mv electron/renderer/out electron/build/renderer",
5656
"build": "yarn clean && concurrently \"yarn build:main\" \"yarn build:preload\" \"yarn build:renderer\"",
5757
"build:dev": "yarn clean && concurrently \"yarn build:main\" \"yarn build:preload\"",

0 commit comments

Comments
 (0)