You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
enableRouteGeneration: false also disables autoCodeSplitting #5087
When using the Vite plugin, if you set enableRouteGeneration: false (for instance if you don't want to generate routes when building since they shouldn't be changing) and autoCodeSplitting: true, then it won't automatically code split the built version.
Your Example Website or App
N/A
Steps to Reproduce the Bug or Issue
Set enableRouteGeneration: false and autoCodeSplitting: true
Build the application and routes won't be split automatically, you need to use .lazy
Expected behavior
I expect to have automatic code splitting regardless of what is set for enableRouteGeneration
Confirmed on current main. autoCodeSplitting is enabled, but its transform only processes files present in the shared route metadata. Setting enableRouteGeneration: false returns before that metadata is populated, so the splitter skips every route.
Keeping this open as a bug. Disabling route-tree generation should not disable the route discovery needed by automatic code splitting. This combination also needs regression coverage at the plugin level.
I'd like to work on this. From reading the plugin code, when enableRouteGeneration: false the composed plugin still adds the code splitter, but the generator returns early, so the splitter never gets the route metadata it needs. I'll keep code splitting working with generation turned off and add a test that covers that combination.
Written with the help of an agent (Claude Code, claude-opus-5-5).
Activity
LadyBluenotes commentedon Jul 15, 2026
Confirmed on current main.
autoCodeSplittingis enabled, but its transform only processes files present in the shared route metadata. SettingenableRouteGeneration: falsereturns before that metadata is populated, so the splitter skips every route.Keeping this open as a bug. Disabling route-tree generation should not disable the route discovery needed by automatic code splitting. This combination also needs regression coverage at the plugin level.
anzal1 commentedon Oct 10, 2026
I'd like to work on this. From reading the plugin code, when
enableRouteGeneration: falsethe composed plugin still adds the code splitter, but the generator returns early, so the splitter never gets the route metadata it needs. I'll keep code splitting working with generation turned off and add a test that covers that combination.Written with the help of an agent (Claude Code, claude-opus-5-5).
refactor(router-plugin): remove enableRouteGeneration option (#8737)