chore: VITE_DEV_SERVER_URL instead app.isPackaged
This commit is contained in:
1 parent
4a83703608
commit
a9240837be
1 file changed
+3
-4
@@ -98,10 +98,9 @@ ipcMain.handle('open-win', (event, arg) => {
|
||||
},
|
||||
})
|
||||
|
||||
if (app.isPackaged) {
|
||||
childWindow.loadFile(indexHtml, { hash: arg })
|
||||
} else {
|
||||
if (process.env.VITE_DEV_SERVER_URL) {
|
||||
childWindow.loadURL(`${url}#${arg}`)
|
||||
// childWindow.webContents.openDevTools({ mode: "undocked", activate: true })
|
||||
} else {
|
||||
childWindow.loadFile(indexHtml, { hash: arg })
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user