question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bundle size becomes much bigger with Webpack 2

See original GitHub issue

When running my build on the stable branch i get this

Hash: bcb00f2d62e74000ed17
Version: webpack 1.13.0
Time: 4193ms
              Asset     Size  Chunks             Chunk Names
    index.bundle.js  2.26 MB       0  [emitted]  main
index.bundle.js.map  2.55 MB       0  [emitted]  main
    + 356 hidden modules

but when i upgrade to the latest beta the bundled file size and the number of modules becomes much more

Hash: 7fcf40a3eb38c81d3e15
Version: webpack 2.1.0-beta.7
Time: 4562ms
          Asset    Size  Chunks             Chunk Names
index.bundle.js  6.9 MB       0  [emitted]  main
    + 465 hidden modules

The bundled application is here angular2-esnext-todomvc.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
wa-Nadoocommented, May 17, 2016

Do not use -d shortcut. It resets devtool to eval. Seems like a bug.

2reactions
bebrawcommented, Mar 8, 2017

@vpachedzhi The only explanation I can think of is that source maps are getting inlined in your webpack 2 setup. Could it be that -d flag that enables the behavior? You could try setting devtool: 'source-map' explicitly in your configuration to generate the separate source map files.

Read more comments on GitHub >

github_iconTop Results From Across the Web

3 ways to reduce webpack bundle size - Jakob Lind
3 ways to reduce webpack bundle size · Easy: Run webpack in production mode · Medium: use an analyzer tool such as webpack-bundle-analyzer...
Read more >
How to Reduce Your Webpack Bundle Size for Web ... - Medium
The simple solution is to split your app's code into two bundles (main bundle and vendor bundle or chunk) So your app main...
Read more >
5 Methods to Reduce JavaScript Bundle Size - Bits and Pieces
5 Methods to Reduce JavaScript Bundle Size · 1. Code Splitting with Webpack · 2. Using Webpack Plugins for Tree Shaking · 3....
Read more >
Why is my webpack bundle.js bigger than 7.58MB
This type of source maps is for developmnent only, so if the bundle size is huge it's not an issue. So nothing is...
Read more >
Slimming down your bundle size - LogRocket Blog
React's bundle size is still a bit large (124KB in our project), even after previous optimization we did. In checking the webpack-bundle- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found