mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-31 20:16:36 +08:00
fix(#298): use VITE_DEV_SERVER_URL instead app.isPackaged
This commit is contained in:
parent
e89fa00a58
commit
b2ef751ada
@ -52,12 +52,12 @@ async function createWindow() {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if (app.isPackaged) {
|
if (process.env.VITE_DEV_SERVER_URL) { // #298
|
||||||
win.loadFile(indexHtml)
|
|
||||||
} else {
|
|
||||||
win.loadURL(url)
|
win.loadURL(url)
|
||||||
// Open devTool if the app is not packaged
|
// Open devTool if the app is not packaged
|
||||||
win.webContents.openDevTools()
|
win.webContents.openDevTools()
|
||||||
|
} else {
|
||||||
|
win.loadFile(indexHtml)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test actively push message to the Electron-Renderer
|
// Test actively push message to the Electron-Renderer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user