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: split chunks more delicately for devFriendlySplitChunks: true #2651

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

hyf0
Copy link
Contributor

@hyf0 hyf0 commented Apr 6, 2023

Summary

Generally, this PR does the following things:

  1. Try to create chunks. Each chunk contains 2000 shared modules.
  2. If the created chunk is bigger than 3MB, split the chunk into a small ones.

With this PR, every js asset of the FS project is smaller than 3.6MB.

Related issue (if exists)

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 6, 2023

⚠️ No Changeset found

Latest commit: eb2cc61

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Apr 6, 2023
@hyf0 hyf0 requested a review from h-a-n-a April 6, 2023 14:07
@hyf0 hyf0 enabled auto-merge April 6, 2023 14:28
@hyf0 hyf0 changed the title feat: split chunks more delicately in for devFriendlySplitChunks: true feat: split chunks more delicately for devFriendlySplitChunks: true Apr 6, 2023
@hyf0 hyf0 force-pushed the hyf_optimize_chunk_sizes branch from 409be20 to eb2cc61 Compare April 7, 2023 05:06
@ahabhgk

This comment was marked as outdated.

1 similar comment
@ahabhgk
Copy link
Contributor

ahabhgk commented Apr 7, 2023

!eco-ci

@ahabhgk
Copy link
Contributor

ahabhgk commented Apr 7, 2023

📝 Ran ecosystem CI: Open

suite result
modernjs ⏹️ cancelled

@hyf0 hyf0 added this pull request to the merge queue Apr 7, 2023
Merged via the queue into main with commit bb3014a Apr 7, 2023
@hyf0 hyf0 deleted the hyf_optimize_chunk_sizes branch April 7, 2023 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants