From e886c56dd9c044fc61d560780b5c80f37e81b695 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Tue, 9 Jun 2026 11:11:01 -0700 Subject: [PATCH] fix: prebundle deps before loading electron app (#254) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- js/desktop/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/desktop/package.json b/js/desktop/package.json index 17f4c6f..76733a5 100644 --- a/js/desktop/package.json +++ b/js/desktop/package.json @@ -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",