-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Enviroment: vite@7.3.7 vite-plugin-electron@0.29.0
Start project using npx vite
Main process code to reappear the fault:
import { app, BrowserWindow } from 'electron'
export const VITE_DEV_SERVER_URL = process.env.VITE_DEV_SERVER_URL
let win: BrowserWindow | null = null
async function createWindow() {
win = new BrowserWindow({
})
if (VITE_DEV_SERVER_URL) {
await win.loadURL(VITE_DEV_SERVER_URL)
win.webContents.openDevTools()
}
}
app.whenReady().then(createWindow)Fault Phenomenon:
The app will crash when save the main process file to restart.
The app will work correctly when save the file twice.
Removing win.webContents.openDevTools(), the app will work correctly .
Using the vite@5.4.11, the app will work correctly .
Metadata
Metadata
Assignees
Labels
No labels