Skip to content

Commit e302f21

Browse files
committed
Move preload back to cjs for now
1 parent a5e97ca commit e302f21

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const createWindow = (logStream: WriteStream) => {
8080
height: windowState.height,
8181

8282
webPreferences: {
83-
preload: path.join(import.meta.dirname, 'preload.js'),
83+
preload: path.join(import.meta.dirname, 'preload.cjs'),
8484
contextIsolation: true,
8585
nodeIntegration: false
8686
},
File renamed without changes.

strip-preload-map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ function removeSourceMapAnnotation(filePath: string): void {
2020
// We have to strip the source map comment from here, otherwise when it loads
2121
// in Chrome, it tries to get preload.js.map from the real server, leaving
2222
// us with an annoying error because that's never going to work.
23-
const filePath = path.join(import.meta.dirname, 'build', 'preload.js');
23+
const filePath = path.join(import.meta.dirname, 'build', 'preload.cjs');
2424
removeSourceMapAnnotation(filePath);

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"include": [
3131
"./src/index.ts",
32-
"./src/preload.ts",
32+
"./src/preload.cts",
3333
"./custom-typings/**/*.d.ts"
3434
]
3535
}

0 commit comments

Comments
 (0)