Skip to content

Commit b2ef751

Browse files
committed
fix(#298): use VITE_DEV_SERVER_URL instead app.isPackaged
1 parent e89fa00 commit b2ef751

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

electron/main/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ async function createWindow() {
5252
},
5353
})
5454

55-
if (app.isPackaged) {
56-
win.loadFile(indexHtml)
57-
} else {
55+
if (process.env.VITE_DEV_SERVER_URL) { // #298
5856
win.loadURL(url)
5957
// Open devTool if the app is not packaged
6058
win.webContents.openDevTools()
59+
} else {
60+
win.loadFile(indexHtml)
6161
}
6262

6363
// Test actively push message to the Electron-Renderer

0 commit comments

Comments
 (0)