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

The difference in bundle size between Rspack and Webpack artifacts #4171

Closed
chenjiahan opened this issue Sep 11, 2023 · 8 comments
Closed

The difference in bundle size between Rspack and Webpack artifacts #4171

chenjiahan opened this issue Sep 11, 2023 · 8 comments
Labels
bug Something isn't working stale team The issue/pr is created by the member of Rspack.

Comments

@chenjiahan
Copy link
Member

System Info

System:
OS: macOS 13.5.2
CPU: (10) arm64 Apple M1 Pro
Memory: 2.64 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.14.1 - ~/Library/Caches/fnm_multishells/70582_1694424744062/bin/node
Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/70582_1694424744062/bin/yarn
npm: 9.3.1 - ~/Library/Caches/fnm_multishells/70582_1694424744062/bin/npm
pnpm: 7.18.1 - ~/Library/Caches/fnm_multishells/70582_1694424744062/bin/pnpm
Browsers:
Chrome: 116.0.5845.179
Safari: 16.6

Details

The bundle size of Rspack and Webpack artifacts are very different.

Webpack

Webpack creates smaller chunks, the difference in size between chunks is not as great as Rspack.

And the total size is smaller, but the gzipped size is larger than Rspack.

  • Total size: 6.16 MB
  • Gzipped size: 1.74 MB

image

Rspack

Rspack creates a 3.73 MB large chunk, and the total size is larger.

  • Total size: 6.78 MB
  • Gzipped size: 1.71 MB

image

Reproduce link

https://github.com/chenjiahan/rspack-split-chunks-size

Reproduce Steps

Clone

git clone git@github.com:chenjiahan/rspack-split-chunks-size.git

Webpack

cd webpack && pnpm i && pnpm build --analyze

Rspack

cd rspack && pnpm i && pnpm build --analyze
@chenjiahan chenjiahan added bug Something isn't working pending triage The issue/PR is currently untouched. labels Sep 11, 2023
@chenjiahan
Copy link
Member Author

Ref: #3120

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Sep 11, 2023
@hyf0 hyf0 removed the pending triage The issue/PR is currently untouched. label Sep 12, 2023
Copy link

stale bot commented Nov 11, 2023

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 stale bot added the stale label Nov 11, 2023
@hardfist
Copy link
Contributor

bump

@stale stale bot removed the stale label Nov 11, 2023
@hardfist
Copy link
Contributor

@JSerFeng can you help revisit the issue ?

Copy link

stale bot commented Jan 10, 2024

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 stale bot added the stale label Jan 10, 2024
@JSerFeng
Copy link
Contributor

bump

@stale stale bot removed the stale label Jan 11, 2024
Copy link

stale bot commented Mar 11, 2024

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 stale bot added the stale label Mar 11, 2024
@chenjiahan
Copy link
Member Author

Now (Rspack v0.6.1) the total size is smaller than webpack and no more large chunks, so I will close this issue.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

No branches or pull requests

4 participants