-
Notifications
You must be signed in to change notification settings - Fork 93
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
Huge discrepancy for minified size? #31
Comments
Oh wow, I just found out that the minified size is just the proportion of the output bundle. In the case of React that is very inaccurate because a lot of code is snipped when compiling for production. I was thinking that the minified sizes were a reasonable estimate, but that is not the case here. So maybe the warning about the minified size should be changed to be "minified sizes are an estimation based solely on the raw size". |
+1 here. Tried to debug the same situation. React in app bundle size was 60kb, size of react in separate bundle was 20kb. Made line by line comparison of each file in the minimised bundle. Result:
So full size must be 34kb, not 60kb. Same results as @wmertens for react-dom. Even worse for lodash. |
+1 My bundle visualization says react-dom is 2M actual / 512.1k raw I can't correlate that to what I see in node_modules/react-dom/dist: |
I think that this is same issue as webpack-contrib/webpack-bundle-analyzer#161 |
I was puzzled by the fact that my react-dom dependency is 506KB raw and 200KB minified, while the official build is 600KB raw and 120KB minified.
I tried comparing minification settings etc before thinking of simply creating an entry with only react-dom. That one has the minified react-dom at 109KB, much nicer and to be expected from tree shaking vs the full minified build.
So now I wonder, what causes the discrepancy between the minified size in my app.js vs the react-dom-only entry? Is there actually more code in the react-dom in my app.js? Are parts counted differently? All the minified sizes do seem to add up to the full minified size…
The text was updated successfully, but these errors were encountered: