V
V
Vadim2015-12-26 22:05:17
JavaScript
Vadim, 2015-12-26 22:05:17

How to remove unnecessary data from a webpack bundle?

I'm compiling the project with webpack, and noticed a nuisance. When all modules are shown, the total size of the files is two times less than the file into which the sources are compiled
GYksaYK.png(KB)
and, most importantly, what is most interesting, when minimizing the file becomes even larger
c8ijzoo.png
. What could be the problem? Misuse or webpack bug?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aitem, 2015-12-28
@Aitem

It's hard to say, most likely you are using webpack incorrectly, judging by such huge bundles.
And judging by the volume, the non-minified angular is used (as far as I know, it weighs under one and a half meters). And yet, I would not advise minifying already minified scripts, because the volume will not be changed, but it will take many times longer to assemble, and the webpack is not very quick anyway.
If the application is browser-based, then in order to reduce build time and volume, you can connect angular, jailbreak, bootstrapJS, etc. via CDN.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question