mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 11:56: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) {
|
||||
win.loadFile(indexHtml)
|
||||
} else {
|
||||
if (process.env.VITE_DEV_SERVER_URL) { // #298
|
||||
win.loadURL(url)
|
||||
// Open devTool if the app is not packaged
|
||||
win.webContents.openDevTools()
|
||||
} else {
|
||||
win.loadFile(indexHtml)
|
||||
}
|
||||
|
||||
// Test actively push message to the Electron-Renderer
|
||||
|
Loading…
x
Reference in New Issue
Block a user