Restore Electron main.js entry and stabilize Vite watch

This commit is contained in:
webadderall committed 2026-05-02 16:10:45 +10:00
1 parent c8e3919428
commit 41bf5e6bad
2 files changed
+9 -9

No files matched your search

+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",
},
},
},
},