mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 11:56:36 +08:00
fix(🐞): load path
This commit is contained in:
parent
d6f1bdc9ab
commit
5387510adc
@ -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 splash = join(__dirname, '../electron-preload/splash.js')
|
const splash = join(__dirname, '../preload/splash.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']}`
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ async function createWindow() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (app.isPackaged) {
|
if (app.isPackaged) {
|
||||||
win.loadFile(join(__dirname, '../index.html'))
|
win.loadFile(join(__dirname, '../../index.html'))
|
||||||
} else {
|
} else {
|
||||||
win.loadURL(url)
|
win.loadURL(url)
|
||||||
// win.webContents.openDevTools()
|
// win.webContents.openDevTools()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "electron-vue-vite",
|
"name": "electron-vue-vite",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"main": "dist/electron-main/index.js",
|
"main": "dist/electron/main/index.js",
|
||||||
"author": "草鞋没号 <308487730@qq.com>",
|
"author": "草鞋没号 <308487730@qq.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user