Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add some analyze script for npm packages #798

Closed
themre opened this issue Sep 29, 2016 · 9 comments
Closed

Add some analyze script for npm packages #798

themre opened this issue Sep 29, 2016 · 9 comments

Comments

@themre
Copy link
Contributor

themre commented Sep 29, 2016

Hi,
I would love to have some anylyze script that would print out size for individual package bundled with webpack.
Something like I read here: http://stackoverflow.com/questions/34700844/how-can-i-find-out-the-size-of-the-included-packages-with-webpack-or-npm

@gaearon
Copy link
Contributor

gaearon commented Sep 29, 2016

Agree this would be nice but not sure what approach would be most useful.
Maybe if you could submit a proof of concept we could iterate on it.
Alternatively we can just output build/stats.json and tell people to use webpack analyzer with it.

@themre
Copy link
Contributor Author

themre commented Sep 29, 2016 via email

@mxstbr
Copy link
Contributor

mxstbr commented Sep 29, 2016

Alternatively we can just output build/stats.json and tell people to use webpack analyzer with it.

This is what we do at react-boilerplate, see our analyze.js script (which is invoked with the npm run analyze command) and feel free to copy it!

@themre themre mentioned this issue Oct 5, 2016
@colingalindo
Copy link
Contributor

Is this still a discussion? I was thinking of trying and implementing what @mxstbr mentioned.

@gaearon
Copy link
Contributor

gaearon commented Jan 27, 2017

Feel free to send a PR!
I’m a bit behind the issues right now but maybe other maintainers can provide feedback.

@themre
Copy link
Contributor Author

themre commented May 26, 2017

I added webpack bundle analyzer since it gives you a lot more information if we want to run stats on our bundle. I sent first PR #2359, however CI is failing on node 6. Any clue?

@franklinjavier
Copy link

Guys, I highly recommend the Bundle Buddy tool from @samccone

https://twitter.com/franklinjavier/status/931324987654443008?s=17

@trevorwhealy
Copy link

trevorwhealy commented Nov 29, 2017

A bit of a hack, but you can create your own very simple script that appends the webpack-bundle-analyzer plugin to the config without ejecting. I wrote about it here: #3518

@gaearon
Copy link
Contributor

gaearon commented Jan 14, 2018

Closing in favor of more recent discussion in #1858.

@gaearon gaearon closed this as completed Jan 14, 2018
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

6 participants