diff --git a/electron/main/index.ts b/electron/main/index.ts index 6c38268..1b376f1 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -25,7 +25,8 @@ export const ROOT_PATH = { let win: BrowserWindow | null = null // Here, you can also use other preload const preload = join(__dirname, '../preload/index.js') -const url = `http://${process.env.VITE_DEV_SERVER_HOST}:${process.env.VITE_DEV_SERVER_PORT}` +// 🚧 Use ['ENV_NAME'] avoid vite:define plugin +const url = `http://${process.env['VITE_DEV_SERVER_HOST']}:${process.env['VITE_DEV_SERVER_PORT']}` const indexHtml = join(ROOT_PATH.dist, 'index.html') async function createWindow() {