Production bundle bigger than dev bundle
See original GitHub issueHi,
This may be a dumb question, but I just noticed that my production bundle is heavier than the development one, does that make sense?
When I use npm start
, my bundle.js is 382KB, while when I run npm run build
, I get a 600KB main.xxx.js.
I would have thought that the production version would be lighter, but maybe optimizations come with the price of a bigger version?
Thank you by advance!
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Why ReactJS bundle size in development mode is smaller ...
The configuration seems to work pretty well, but the bundle size in development mode is smaller than production mode.
Read more >5 Methods to Reduce JavaScript Bundle Size - Bits and Pieces
Using Production Mode in Webpack. Running your project in production mode reduces the bundle sizes compared to the development mode. Webpack ...
Read more >How CommonJS is making your bundles larger - web.dev
In this post, we'll look into what CommonJS is and why it's making your JavaScript bundles larger than necessary.
Read more >3 ways to reduce webpack bundle size - Jakob Lind
With webpack, you can split your bundle into many smaller bundles, and then the browser can automatically fetch the bundles needed asynchronously. This...
Read more >Slimming down your bundle size - LogRocket Blog
They can also be external dependencies and libraries you use to build your application like React, lodash, or jQuery. So in order for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Are you aware that code like this:
will pull all the locales into your bundle because Webpack can’t guess which one it would be?
(This still should affect both dev and prod size, but just to double check.)
In my case the dev bundle was gzipped while the prod wasn’t making it appear larger.