TanStackT
TanStackβ€’10mo agoβ€’
16 replies
inadequate-blush

Debugging huge bundle sizes

Hey there! I've been shipping TSS in production and I noticed that even on small routes my bundle size is quite large. Over 500 kilobytes to be exact πŸ˜Άβ€πŸŒ«οΈ

I don't think I quite understand how TSS/TSR is doing code splitting as the offending route is a landing page which I have explicitly isolated from the rest of the application. It does not use server functions. It does not import anything from the main application layout. It was purpose built to be a quick-loading marketing page.


Its performance is good. It gets good Lighthouse/PSI scores and all of that. But that bundle size is hurting me inside. Does a massive client bundle just get shipped with every route? Or are there more things I can do to debug this?
Was this page helpful?