chore: VITE_DEV_SERVER_URL instead app.isPackaged

This commit is contained in:
草鞋没号 2022-12-12 08:56:27 +08:00
parent f9fee2e62f
commit 0776ebea38

View File

@ -10,7 +10,9 @@
//
process.env.DIST_ELECTRON = join(__dirname, '..')
process.env.DIST = join(process.env.DIST_ELECTRON, '../dist')
process.env.PUBLIC = app.isPackaged ? process.env.DIST : join(process.env.DIST_ELECTRON, '../public')
process.env.PUBLIC = process.env.VITE_DEV_SERVER_URL
? join(process.env.DIST_ELECTRON, '../public')
: process.env.DIST
import { app, BrowserWindow, shell, ipcMain } from 'electron'
import { release } from 'os'