Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(splitting): support minChunkSize option #3302

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ArrayZoneYour
Copy link
Contributor

fix #2901, #2419, related to #207

When there are many entry points, it is easy to generate some small chunks.

This MR try to land minChunkSize options to control the chunk size by source content size

@ArrayZoneYour ArrayZoneYour force-pushed the feat/add_min_chunk_size_support branch from b956b4b to a6fa07c Compare August 9, 2023 14:22
@ArrayZoneYour ArrayZoneYour force-pushed the feat/add_min_chunk_size_support branch from a6fa07c to 8851bd5 Compare August 9, 2023 14:31
@davidwallacejackson
Copy link

@evanw This would be really high-impact for my team, as I believe that chunk size is the only thing preventing us from switching from Rollup to esbuild. You mentioned that you intended to eventually rework the linker to support more customizable chunking behavior -- would you be open to merging this solution as a stopgap for now?

@fochlac
Copy link

fochlac commented Sep 13, 2023

I tried to locally compile this and test it with out project, however, the result is not working. After enabling the minChunkSize some of the imports are no longer working. In my case the require_prop_types is not defined.

@ArrayZoneYour
Copy link
Contributor Author

I tried to locally compile this and test it with out project, however, the result is not working. After enabling the minChunkSize some of the imports are no longer working. In my case the require_prop_types is not defined.

@fochlac Can you provide a minimal reproducible use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Too many small chunks
3 participants