fix: prebundle deps before loading electron app (#254)

Electron Forge restarts the renderer process without fully restarting the Vite dev server, so the browser gets a fresh page with a new hash but the Vite server still has the old pre-bundle cache — mismatch causes the 504 outdated error every other time we launch.
This commit was merged in pull request #254.
This commit is contained in:
Arjun Patel
2026-06-09 11:11:01 -07:00
committed by GitHub
parent 946d141897
commit e886c56dd9
+1 -1
View File
@@ -6,7 +6,7 @@
"main": ".vite/build/main.js",
"private": true,
"scripts": {
"start": "electron-forge start",
"start": "cross-env vite optimize -c vite.main.config.ts && electron-forge start",
"package:mac": "APP_ENV=prod electron-forge package --arch=arm64 && APP_ENV=prod electron-forge package --arch=x64",
"package:win": "cross-env APP_ENV=prod electron-forge package --platform=win32 --arch=x64",
"make:mac": "APP_ENV=prod electron-forge make --arch=arm64 && APP_ENV=prod electron-forge make --arch=x64",