Skip to content

Commit 46e8c8d

Browse files
committed
fix(desktop): point main to preload/index.mjs (electron-vite outputs .mjs not .js)
Onboarding step 2 was showing 'Renderer is not connected to the main process' because BrowserWindow.webPreferences.preload pointed at .js while electron-vite outputs .mjs. Electron 33+ supports .mjs preload natively. Signed-off-by: hqhq1025 <1506751656@qq.com>
1 parent a11f416 commit 46e8c8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/desktop/src/main/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function createWindow(): void {
2323
backgroundColor: BRAND.backgroundColor,
2424
show: false,
2525
webPreferences: {
26-
preload: join(__dirname, '../preload/index.js'),
26+
preload: join(__dirname, '../preload/index.mjs'),
2727
sandbox: true,
2828
contextIsolation: true,
2929
nodeIntegration: false,

0 commit comments

Comments
 (0)