Restore Electron main.js entry and stabilize Vite watch

This commit is contained in:
webadderall
2026-05-02 16:10:45 +10:00
parent 62f015cb0b
commit 6b9fa60b36
2 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -107,5 +107,5 @@
"vitest": "^4.0.16",
"web-demuxer": "^4.0.0"
},
"main": "dist-electron/main.cjs"
"main": "dist-electron/main.js"
}
+8 -8
View File
@@ -5,6 +5,14 @@ import electron from "vite-plugin-electron/simple";
// https://vitejs.dev/config/
export default defineConfig({
server: {
watch: {
awaitWriteFinish: {
stabilityThreshold: 300,
pollInterval: 100,
},
},
},
plugins: [
react(),
electron({
@@ -13,16 +21,8 @@ export default defineConfig({
entry: "electron/main.ts",
vite: {
build: {
lib: {
entry: "electron/main.ts",
formats: ["cjs"],
},
rollupOptions: {
external: ["ffmpeg-static", "uiohook-napi"],
output: {
entryFileNames: "[name].cjs",
chunkFileNames: "[name].cjs",
},
},
},
},