mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 03:46:35 +08:00
chore: rename
This commit is contained in:
parent
54b44eb4b6
commit
f094cbac34
@ -16,7 +16,7 @@ process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
|
|||||||
|
|
||||||
let win: BrowserWindow | null = null
|
let win: BrowserWindow | null = null
|
||||||
// Here, you can also use other preload
|
// Here, you can also use other preload
|
||||||
const index = join(__dirname, '../preload/index.js')
|
const preload = join(__dirname, '../preload/index.js')
|
||||||
// 🚧 Use ['ENV_NAME'] avoid vite:define plugin
|
// 🚧 Use ['ENV_NAME'] avoid vite:define plugin
|
||||||
const url = `http://${process.env['VITE_DEV_SERVER_HOST']}:${process.env['VITE_DEV_SERVER_PORT']}`
|
const url = `http://${process.env['VITE_DEV_SERVER_HOST']}:${process.env['VITE_DEV_SERVER_PORT']}`
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ async function createWindow() {
|
|||||||
win = new BrowserWindow({
|
win = new BrowserWindow({
|
||||||
title: 'Main window',
|
title: 'Main window',
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: index,
|
preload,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
contextIsolation: false,
|
contextIsolation: false,
|
||||||
},
|
},
|
||||||
@ -77,7 +77,7 @@ app.on('activate', () => {
|
|||||||
ipcMain.handle("open-win", (event, arg) => {
|
ipcMain.handle("open-win", (event, arg) => {
|
||||||
const childWindow = new BrowserWindow({
|
const childWindow = new BrowserWindow({
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: index,
|
preload,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user