replace url with the VITE_DEV_SERVER_URL env key in vite

This commit is contained in:
Youssef Hajjari 2022-08-12 14:54:11 +00:00
parent 4d129d0c5c
commit 009e39319c
1 changed files with 1 additions and 1 deletions

View File

@ -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() {