From 009e39319c29369a5f457c6317fd7e63ff39dd76 Mon Sep 17 00:00:00 2001 From: Youssef Hajjari Date: Fri, 12 Aug 2022 14:54:11 +0000 Subject: [PATCH] replace url with the VITE_DEV_SERVER_URL env key in vite --- electron/main/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron/main/index.ts b/electron/main/index.ts index 488afed..aff59d8 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -26,7 +26,7 @@ let win: BrowserWindow | null = null // Here, you can also use other preload const preload = join(__dirname, '../preload/index.js') // 🚧 Use ['ENV_NAME'] avoid vite:define plugin -const url = `http://${process.env['VITE_DEV_SERVER_HOST']}:${process.env['VITE_DEV_SERVER_PORT']}` +const url = process.env.VITE_DEV_SERVER_URL as string; const indexHtml = join(ROOT_PATH.dist, 'index.html') async function createWindow() {