chore: VITE_DEV_SERVER_URL instead app.isPackaged

This commit is contained in:
草鞋没号 committed 2022-11-22 08:15:04 +08:00
1 parent 4a83703608
commit a9240837be
1 file changed
+3 -4
+3 -4
View File
@@ -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 })
}
})