lodash / babel-plugin-lodash

Modular Lodash builds without the hassle.
Other
1.95k stars 95 forks source link

Not reducing bundle size #209

Closed deadcoder0904 closed 6 years ago

deadcoder0904 commented 6 years ago

I've made a repo demonstrating my problem.

It has dist/vendor.min.js which is generated using this plugin & gives a size of 30.1 kB gzip while I am not using a lot of JavaScript.

The expected bundle size must be around 5 kB gzip but for me its a lot.

Anything that I've done wrong because I exactly followed the steps mentioned here ❓

deadcoder0904 commented 6 years ago

Ok so quick update. develop branch on that repo has 1 change that made it reduce to 4 kB & 585 B gzip & the change that I've made is I've removed CommonChunksPlugin.

Is it possible to get it to work with CommonChunksPlugin & stripping off everything else ❓

jdalton commented 6 years ago

Hi @deadcoder0904!

I'm not sure. I'm not familiar with how theCommonChunksPlugin interacts with others.

deadcoder0904 commented 6 years ago

Cool no problem

deadcoder0904 commented 6 years ago

Hey I solved it. Adding minChunks property & removing entry.vendor did the job 🎉

Solution in the repo https://github.com/deadcoder0904/webpack-exam