Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

how about a CLI version #26

Open
mikeerickson opened this issue Jan 14, 2017 · 3 comments
Open

how about a CLI version #26

mikeerickson opened this issue Jan 14, 2017 · 3 comments

Comments

@mikeerickson
Copy link

Something like

$ visualize stats.json

which will proceed to build chart and open web page (locally)

@chrisbateman
Copy link
Owner

Can you write a bit more about the use case for this?

If you're using the plugin you should be able to open dist/stats.html

@mikeerickson
Copy link
Author

I am not using the plugin version, but will give it a whirl.

@lionel-bijaoui
Copy link

The idea would be to do the same thing as https://github.com/th0r/webpack-bundle-analyzer.
I have an "analyse" npm script that output a lot of information about the bundle size and chunk. I look like that:

webpack --config build/webpack.prod.conf.js --json --profile --progress > stats.json && webpack-bundle-analyzer stats.json --mode static --report report.html

That create a report.html and open it automatically. I also don't have to modify the config files and script to get that. I only feed webpack-bundle-analyzer the stats.json and it output everything relative my project folder, not the output of the bundle.
Since your plugin seem to feed from the same file (stats.json), it would be fantastic to be able to do the same thing:

webpack --config build/webpack.prod.conf.js --json --profile --progress > test/analyze/stats.json && webpack-visualizer-plugin stats.json --output output.html

I have no idea how hard this is, and I have zero knowledge about webpack plugins but maybe the sources of https://github.com/th0r/webpack-bundle-analyzer could help ?
Anyway, thank you for your work on this really nice visualizer. I has already helped me reduce the size of my bundles and efficiently detect the major problems at a glance 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants