0

Using "lodash": "^4.17.5",

Why is Lodash that big after doing : webpack ?

It looks like the sourceMapping is bloating the file...

enter image description here


sourceURL=[module]\n// 
sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsiQzpcXGluZXRwdWJcXHd3d3Jvb3RcXFdlYlBhY2tfVHlwZVNjcmlwdF9TZXR1cF9FeGFtcGxlXFxub2RlX21vZHVsZXNcXGxvZGFzaFxcbG9kYXNoLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIExvZGF.......
...
.
.
.
matisetorm
  • 857
  • 8
  • 21
Legends
  • 21,202
  • 16
  • 97
  • 123

1 Answers1

0

I have used webpack with option parameters like this:

webpack -d --env.dev --display-modules --progress --display-error-details"

The "problem" here is the -d flag.

Development shortcut -d: Equals to --debug --devtool source-map --output-pathinfo

CLI reference

Removing the flag shortens the lodash.js file size to 70kb, because it does not include the source-mapping data anymore.

Legends
  • 21,202
  • 16
  • 97
  • 123