From b4ea056659835b6c1576eae71d90b610a4af5113 Mon Sep 17 00:00:00 2001 From: rajun Date: Tue, 27 Oct 2026 16:28:46 +0530 Subject: [PATCH] fix: load all routes up front to stop full reloads after creating a project --- react-router.config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/react-router.config.ts b/react-router.config.ts index 6ff16f9..e5a30cf 100644 --- a/react-router.config.ts +++ b/react-router.config.ts @@ -4,4 +4,9 @@ export default { // Config options... // Server-side render by default, to enable SPA mode set this to `false` ssr: true, + // Send every route with the first page. The default ("lazy") asks the server about unseen URLs such as a + // just-created /projects/:id, and forces a full page load when the server's route list has changed since the + // tab opened, which left the admin on the loading screen after creating a project. This app has a handful of + // routes, so lazy discovery saves nothing. + routeDiscovery: { mode: "initial" }, } satisfies Config;