chore: VITE_DEV_SERVER_URL instead `app.isPackaged`

This commit is contained in:
草鞋没号 2022-11-22 08:15:04 +08:00
parent 4a83703608
commit a9240837be
1 changed files with 3 additions and 4 deletions

View File

@ -98,10 +98,9 @@ ipcMain.handle('open-win', (event, arg) => {
}, },
}) })
if (app.isPackaged) { if (process.env.VITE_DEV_SERVER_URL) {
childWindow.loadFile(indexHtml, { hash: arg })
} else {
childWindow.loadURL(`${url}#${arg}`) childWindow.loadURL(`${url}#${arg}`)
// childWindow.webContents.openDevTools({ mode: "undocked", activate: true }) } else {
childWindow.loadFile(indexHtml, { hash: arg })
} }
}) })