Post

Rolldown was over-splitting compared to Rollup, I had to manually configure some groups. It has something to do with cycles across chunks and modules imported both through a static and dynamic imports chain, but I cannot get a minimal reproduction to show the same behavior.

Actually, this AI-generated and not Vite-generated graph shows exactly my situation 😛 With this graph shape, Rolldown is automatically splitting what's called "vendor" here into its own chunk, while Rollup was putting it together with "index". There is no reason to split it as far as I can tell.

And this was happening for a whole bunch of modules, causing the number of chunks to increase from ~50 to ~80. The solution in this example would be to manually define a group containing the entry point of the "index" chunk, and then it automatically includes what would otherwise be in "vendor"

0 reposts5 likes