refactor: use vite-plugin-electron/simple API

This commit is contained in:
草鞋没号
2024-01-02 12:17:48 +08:00
parent 374596c331
commit 7ec046370f
3 changed files with 92 additions and 20 deletions

View File

@@ -12,7 +12,7 @@ const __dirname = dirname(__filename)
// │ ├─┬ main
// │ │ └── index.js > Electron-Main
// │ └─┬ preload
// │ └── index.js > Preload-Scripts
// │ └── index.mjs > Preload-Scripts
// ├─┬ dist
// │ └── index.html > Electron-Renderer
//
@@ -40,7 +40,7 @@ if (!app.requestSingleInstanceLock()) {
let win: BrowserWindow | null = null
// Here, you can also use other preload
const preload = join(__dirname, '../preload/index.js')
const preload = join(__dirname, '../preload/index.mjs')
const url = process.env.VITE_DEV_SERVER_URL
const indexHtml = join(process.env.DIST, 'index.html')