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(rspack_plugin_dev_friendly_split_chunks): reduce MAX_MODULES_PER_CHUNK and add MAX_SIZE_PER_CHUNK condition #2578

Merged
merged 3 commits into from
Apr 3, 2023

Conversation

hyf0
Copy link
Collaborator

@hyf0 hyf0 commented Apr 2, 2023

Summary

The FS project emits a 30MB js asset due to the number MAX_MODULES_PER_CHUNK.

This PR reduced the number of MAX_MODULES_PER_CHUNK and add a MAX_SIZE_PER_CHUNK condition to split chunks that are bigger than MAX_SIZE_PER_CHUNK.

Related issue (if exists)

Fixes #2529.

Types of changes

  • Docs change / Dependency upgrade
  • Bug fix
  • New feature / Improvement
  • Refactoring
  • Breaking change

Checklist

  • I have added changeset via pnpm run changeset.
  • I have added tests to cover my changes.

@changeset-bot
Copy link

changeset-bot bot commented Apr 2, 2023

🦋 Changeset detected

Latest commit: d5bc78b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@rspack/binding Patch
@rspack/postcss-loader Patch
@rspack/core Patch
webpack-test Patch
@rspack/playground Patch
@rspack/cli Patch
@rspack/dev-middleware Patch
@rspack/dev-server Patch
@rspack/plugin-html Patch
benchmarkcase-rspack-react-refresh Patch
@rspack/dev-client Patch
@rspack/plugin-minify Patch
@rspack/plugin-node-polyfill Patch
@rspack/binding-darwin-arm64 Patch
@rspack/binding-darwin-x64 Patch
@rspack/binding-linux-x64-gnu Patch
@rspack/binding-win32-x64-msvc Patch
@rspack/fs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@hyf0 hyf0 added the p1-planned label Apr 2, 2023
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Apr 2, 2023
@hyf0 hyf0 requested a review from h-a-n-a April 3, 2023 02:10
@hyf0 hyf0 requested a review from hardfist as a code owner April 3, 2023 02:10
@hyf0 hyf0 enabled auto-merge April 3, 2023 02:51
Copy link
Collaborator

@h-a-n-a h-a-n-a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@hyf0 hyf0 added this pull request to the merge queue Apr 3, 2023
Merged via the queue into main with commit 18dcca0 Apr 3, 2023
5 checks passed
@hyf0 hyf0 deleted the hyf_feat_improve_split_chunks branch April 3, 2023 03:21
@github-actions github-actions bot mentioned this pull request Apr 4, 2023
@github-actions github-actions bot mentioned this pull request Mar 26, 2024
@github-actions github-actions bot mentioned this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: DevFriendlySplitChunksPlugin should split chunks considering the size of modules and chunks
3 participants