browserify / browserify-handbook

how to build modular applications with browserify
Other
4.58k stars 292 forks source link

How to deal with large browserified bundles? #76

Open fergiemcdowall opened 7 years ago

fergiemcdowall commented 7 years ago

Where do you begin when you want to analyse and fix bundles that are too large? What steps would you carry out to see what is taking up the most room in a broswerified bundle?

emilbayes commented 7 years ago

You might have luck trying https://www.npmjs.com/package/disc Note that it doesn't support ES6 last time I used it

fergiemcdowall commented 7 years ago

Disc is cool. Is there a command line tool that does something similar?

emilbayes commented 7 years ago

disc is a cli tool, but you mean one that doesn't show a web interface?

fergiemcdowall commented 7 years ago

Yes, I would ideally like a tool that can be invoked and parsed on the command line

emilbayes commented 7 years ago

It doesn't seem too hard to rip out of disc if you wanted to: https://github.com/hughsk/disc/blob/master/index.js