chore: 升级 vite@2.0

This commit is contained in:
草鞋没号
2021-02-17 22:27:40 +08:00
parent 0ea62ef46a
commit 33114d814d
14 changed files with 940 additions and 1420 deletions

View File

@@ -3,7 +3,6 @@
*/
import { join } from 'path'
import { app, BrowserWindow } from 'electron'
import is_dev from 'electron-is-dev'
import dotenv from 'dotenv'
dotenv.config({ path: join(__dirname, '../../.env') })
@@ -21,9 +20,9 @@ function createWin() {
},
})
const URL = is_dev
? `http://localhost:${process.env.PORT}` // vite 启动的服务器地址
: `file://${join(__dirname, '../render/index.html')}` // vite 构建后的静态文件地址
const URL = app.isPackaged
? `file://${join(__dirname, '../render/index.html')}` // vite 构建后的静态文件地址
: `http://localhost:${process.env.PORT}` // vite 启动的服务器地址
win?.loadURL(URL)
}