diff --git a/vite.config.ts b/vite.config.ts index 6fa6aab..dad278f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,4 +9,10 @@ export default defineConfig({ port: 5173, host: true, // allow external access (local dev only) }, + optimizeDeps: { + // Dev only: scan every app file for libraries at startup. The route list React Router passes matches nothing + // here, so libraries were found late, and Vite reloaded the open page mid-action (e.g. after creating a project), + // which could leave it stuck on the loading screen. + entries: ['app/**/*.{ts,tsx}', '!app/**/*.d.ts', '!app/routes.ts'], + }, });