`enableRouteGeneration: false` also disables `autoCodeSplitting`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
Which project does this relate to?
Router
Describe the bug
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: falseandautoCodeSplitting: 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
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.131.35
- OS: Windows
- Browser: N/A
- Browser Version: N/A
- Bundler: Vite
- Bundler Version: 7.1.4
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Vite plugin entry point where enableRouteGeneration and autoCodeSplitting are handled. Reproduce the issue with route generation disabled and automatic code splitting enabled, then build the application. Done means automatic code splitting still occurs without requiring .lazy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100