From 1c469a2a6ac021473feedffa7f0c4f9e37c2e36e Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 22 Aug 2026 18:01:13 +0300 Subject: [PATCH] Revert "Lazy route discovery to optimize hydration" This reverts commit f87718b17182d79341382334072d2c725278e338. --- react-router.config.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/react-router.config.ts b/react-router.config.ts index f0e30b302..cd53bbf60 100644 --- a/react-router.config.ts +++ b/react-router.config.ts @@ -1,8 +1,9 @@ import type { Config } from "@react-router/dev/config"; export default { - // Fog of war: inlines only the matched routes' manifest (~13KB) instead of the - // full-route-tree manifest asset (~400KB at the time of writing) every page load - routeDiscovery: { mode: "lazy" }, + // Upfront cost vs. lazy loading trade-off + // also lazy loading causes more load on the server + // this matches old Remix v2 behavior + routeDiscovery: { mode: "initial" }, splitRouteModules: true, } satisfies Config;