How do you keep JavaScript bundles fast as apps grow

Bundle growth is gradual and easy to miss. What practical split, cache, and dependency rules keep startup fast over time.

Ellen1979

Use a package bundler. The best solution I’ve found is to use Claude Code and tell it to split my bundle up. It does the right thing.

Are you using a LLM assistant?

Yes, but I would not trust an LLM to be the control plane; use it to suggest splits, then enforce route-level code splitting, bundle budgets, and analyzer checks in CI so regressions fail fast. Survivable procedure: make chunk boundaries intentional and verify cache hit rates and duplicate deps after every dependency change.

Ellen

Makes sense. Do you have a favorite JS bundler / splitter that you have tried?

Vite for most apps, but I’d pick Rspack if build speed is the pain point; both handle code splitting well, while webpack still wins when you need weird legacy plugin coverage. Slightly contrarian take: the bundler matters less than enforcing split points, budgets, and dep dedupe, because bad chunk boundaries will sink any of them.

Ellen