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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle size doubles compares to webpack #7691

Closed
fellmann opened this issue Feb 10, 2022 · 2 comments
Closed

Bundle size doubles compares to webpack #7691

fellmann opened this issue Feb 10, 2022 · 2 comments
Labels
Stale Inactive issues

Comments

@fellmann
Copy link

馃悰 bug report

When bundling a simple js file that imports mobx and keycloak-js, the bundle size doubles, compared to webpack.

馃帥 Configuration (.babelrc, package.json, cli command)

I have boiled the problem down to a minimal working example: https://github.com/fellmann/parcel2-webpack-demo

馃 Expected Behavior

The bundle size should be roughly the same as the webpack generated bundle. Also, mobx should not change its bundle size when keycloak-js is added.

馃槸 Current Behavior

As soon as keycloak-js is imported on top of mobx, the bundle size doubles.

馃拋 Possible Solution

馃敠 Context

This might affect all frontend apps that use keycloak-js.

馃捇 Code Sample

https://github.com/fellmann/parcel2-webpack-demo

馃實 Your Environment

Software Version(s)
Parcel 2.2.1
Node 16.13.2
Operating System Win 10 64bit
@mischnic
Copy link
Member

mischnic commented Mar 3, 2022

This is caused by these evals: https://github.com/emn178/js-sha256/blob/189bb9b03782b80e59516dfbea78f16b5d9754ce/src/sha256.js#L84 (so this is not caused by keycloak itself but its dependency js-sha256)
which deopts Terser into not being able to minify variable names.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

@github-actions github-actions bot added the Stale Inactive issues label Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Inactive issues
Projects
None yet
Development

No branches or pull requests

2 participants