From 0776ebea38d0b31f5507c0b0143d36369facbf83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Mon, 12 Dec 2022 08:56:27 +0800 Subject: [PATCH] chore: VITE_DEV_SERVER_URL instead `app.isPackaged` --- electron/main/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electron/main/index.ts b/electron/main/index.ts index be0fcf5..f952c00 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -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'