{"record":{"id":"9d5d153d47307bf1","repo":"remix-run/react-router","slug":"the-future-v8-splitroutemodules-flag-has-been-mo","errorCode":null,"errorMessage":"The `future.v8_splitRouteModules` flag has been moved to a top-level `config.splitRouteModules` field (default `true`)","messagePattern":"The `future\\.v8_splitRouteModules` flag has been moved to a top-level `config\\.splitRouteModules` field \\(default `true`\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/react-router-dev/config/config.ts","lineNumber":703,"sourceCode":"                  error.loc.column,\n                error.frame.trim?.(),\n              ]\n            : error.stack,\n        ]\n          .flat()\n          .join(\"\\n\"),\n      );\n    }\n  }\n\n  // Check for renamed flags and provide helpful error messages\n  let futureConfig = userAndPresetConfigs.future;\n  if (futureConfig) {\n    if (\n      \"unstable_splitRouteModules\" in futureConfig ||\n      \"v8_splitRouteModules\" in futureConfig\n    ) {\n      return err(\n        \"The `future.v8_splitRouteModules` flag has been moved to a top-level `config.splitRouteModules` field (default `true`)\",\n      );\n    }\n    if (\n      \"unstable_viteEnvironmentApi\" in futureConfig ||\n      \"v8_viteEnvironmentApi\" in futureConfig\n    ) {\n      return err(\n        \"The `future.v8_viteEnvironmentApi` flag has been removed because Vite Environment API usage is now always enabled\",\n      );\n    }\n    if (\n      \"unstable_passThroughRequests\" in futureConfig ||\n      \"v8_passThroughRequests\" in futureConfig\n    ) {\n      return err(\n        \"The `future.v8_passThroughRequests` flag has been removed because pass-through requests are now the default behavior\",\n      );","sourceCodeStart":685,"sourceCodeEnd":721,"githubUrl":"https://github.com/remix-run/react-router/blob/6beaca39526d5716c3c112ebb0782765baa5a9ce/packages/react-router-dev/config/config.ts#L685-L721","documentation":"The `future` config still contains `v8_splitRouteModules` (or its older `unstable_splitRouteModules` alias). That future flag graduated: route module splitting is now controlled by the top-level `splitRouteModules` field and defaults to `true`, so the old flag is rejected with this migration error instead of being ignored.","triggerScenarios":"A `react-router.config.ts` containing `future: { v8_splitRouteModules: false }` (or `unstable_splitRouteModules`) after upgrading @react-router/dev past the point where the flag stabilized; the check runs whenever any `future` config is present.","commonSituations":"Upgrading React Router across a minor/major boundary where v8 future flags landed; projects that opted out of module splitting via `false` now needing the inverted top-level setting; configs copied from upgrade guides that are one version behind.","solutions":["Remove `v8_splitRouteModules`/`unstable_splitRouteModules` from the `future` object.","If you need to disable splitting, set the top-level `splitRouteModules: false` (note the new default is `true`).","Audit remaining `future.*` keys against the current docs — sibling flags may also have stabilized.","Rebuild to confirm config validation passes."],"exampleFix":"// before\nexport default {\n  future: { v8_splitRouteModules: false },\n};\n\n// after\nexport default {\n  splitRouteModules: false,\n};","handlingStrategy":"validation","validationCode":"const MOVED_FLAGS: Record<string, string> = {\n  unstable_splitRouteModules: \"splitRouteModules\",\n  v8_splitRouteModules: \"splitRouteModules\",\n  unstable_viteEnvironmentApi: \"(removed — always enabled)\",\n  v8_viteEnvironmentApi: \"(removed — always enabled)\",\n};\nfor (const key of Object.keys(config.future ?? {})) {\n  if (key in MOVED_FLAGS) throw new Error(`future.${key} moved/removed — update config`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["On every React Router upgrade, diff your `future` block against the current docs and remove stabilized flags.","Read the changesets/release notes for flag graduations before bumping versions.","Prefer top-level stable options over future flags once they graduate."],"tags":["config","migration","future-flags","renamed-option","build"],"backgroundTag":"renamed-config-option","analyzedSha":"6beaca39526d5716c3c112ebb0782765baa5a9ce","analyzedAt":"2026-08-18T18:04:14.938Z","contentChangedAt":"2026-08-18T18:04:14.938Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}