web-infra-dev / rspack

The fast Rust-based web bundler with webpack-compatible API 🦀️
https://rspack.dev
MIT License
9.81k stars 566 forks source link

Support MinChunkSizePlugin #3603

Open IWANABETHATGUY opened 1 year ago

IWANABETHATGUY commented 1 year ago

What problem does this feature solve?

required by the test case webpack-test/configCases/plugins/min-chunk-size/

What does the proposed API of configuration look like?

The same as https://github.com/webpack/webpack/blob/9fcaa243573005d6fdece9a3f8d89a0e8b399613/lib/optimize/MinChunkSizePlugin.js#L1-L113

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

mogelbrod commented 5 days ago

Having MinChunkSizePlugin seems like a great way to avoid superflous async chunks generated by dynamic import() calls, including TanStackRouterRspack({ autoCodeSplitting: true, }). The web app I'm working on is currently polluted by a bunch of <1kb async chunks that don't bring much value to the table (real module id replaced by anonymized):

inottn commented 4 days ago

This issue has been closed, and I'm not sure if it still accepts PR. If it does, I can give it a try.

hardfist commented 4 days ago

This issue has been closed, and I'm not sure if it still accepts PR. If it does, I can give it a try.

yeah it is acceptable