TanStack Start: autoCodeSplitting option not available, causes tons of HTTP requests in dev #6353
mikecfisher
started this conversation in
Ideas
Replies: 1 comment
-
|
Start has autoCodeSplitting enabled by default. autoCodeSplitting still leads to importing each route file in the routeTree.gen.ts file since the route definition itself is needed. a reproducer would be interesting to look at to see if there is anything we could do or if this is only truly solvable by vite's upcoming bundled dev mode. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I'm running into a dev performance issue with TanStack Start that I wanted to raise.
Start's config schema explicitly omits the
autoCodeSplittingoption that's available in standalone Router. This means routeTree.gen.ts statically imports every route upfront.For my app with ~100 routes, this translates to 700+ HTTP requests on every page load in Vite dev mode. It's bad enough that it hits ngrok's rate limit (360 req/min) and makes the dev server painfully slow.
I know Router v2 plans to enable autoCodeSplitting by default (#975), but in the meantime is there a reason Start omits this option? Or is there another way to get lazy route tree imports working with Start?
The manual .lazy.tsx approach helps but doesn't fully solve it since routes with beforeLoad guards still need their config file loaded statically.
Happy to provide more details or a reproduction if helpful.
Beta Was this translation helpful? Give feedback.
All reactions