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

[Bug]: Angular bundle size 2x bigger than with Webpack #6436

Open
edbzn opened this issue May 2, 2024 · 0 comments
Open

[Bug]: Angular bundle size 2x bigger than with Webpack #6436

edbzn opened this issue May 2, 2024 · 0 comments
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@edbzn
Copy link
Contributor

edbzn commented May 2, 2024

System Info

System:
OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 25.70 GB / 30.98 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 20.11.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.4 - /usr/local/bin/npm
pnpm: 8.15.1 - /usr/local/bin/pnpm
bun: 1.0.22 - ~/.bun/bin/bun
Browsers:
Brave Browser: 121.1.62.165
Chrome: 121.0.6167.184
npmPackages:
@rspack/cli: ^0.6.3 => 0.6.3
@rspack/core: ^0.6.3 => 0.6.3

Details

Hi,

I'm trying Rspack with Angular, and all the critical features seem to be working. However, the bundle size generated by Rspack is 2x bigger than base builders. Here's the configuration I'm using. The generated main.js file is around 421K in my example against around 250K for Webpack or Esbuild. You can see the build logs here. Do you have an idea why, and how I can get approximatively the same bundle size?

Thanks!

Reproduce link

https://github.com/edbzn/ng-rspack/blob/main

Reproduce Steps

Rspack bundle size:

pnpm nx build && ls -lah dist/ng-rspack/rspack

Webpack bundle size:

pnpm nx build-wp && ls -lah dist/ng-rspack/webpack
@edbzn edbzn added bug Something isn't working pending triage The issue/PR is currently untouched. labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

1 participant