Skip to content

[Feature Request]: Add experimentalMinChunkSize option #4932

@mattlewis92

Description

@mattlewis92

What problem does this feature solve?

We are currently using the experimentalMinChunkSize rollup option to reduce the amount of chunks created by the bundler, as without it our application startup time is incredibly slow due to hundreds of common chunk requests when initially loading the app. Using the experimentalMinChunkSize rollup option, we are able to reduce the total size of all chunks that make up our application from ~2500 to ~600 to make our apps initial load time more reasonable.

I did experiment with the advancedChunks rolldown option, but I'm not sure it meets our use case, as we'd like to be able to configure a global default for the minimum chunk size, and that option seems to require us to manually configure every chunk. Ideally you could just set advancedChunks.minSize without needing to configure advancedChunks.groups, and it would prevent rolldown from creating any chunks that are smaller than this size.

Without a way to configure a global minimum chunk size, we'd be unable to switch from rollup to rolldown, as our initial load time would suffer too much (and is probably going to be a similar story for lots of other large applications)

Thanks for all the work you've done on rolldown, I'm really excited to start using it!

What does the proposed API look like?

https://rollupjs.org/configuration-options/#output-experimentalminchunksize

and the weback equivalent is:
https://webpack.js.org/plugins/split-chunks-plugin/#splitchunksminsize

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions