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

Provide options to receive webpack --json #3179

Closed
JohannesRudolph opened this issue Nov 17, 2016 · 4 comments
Closed

Provide options to receive webpack --json #3179

JohannesRudolph opened this issue Nov 17, 2016 · 4 comments
Labels
feature Issue that requests a new feature P5 The team acknowledges the request but does not plan to address it, it remains open for discussion

Comments

@JohannesRudolph
Copy link
Contributor

Versions

angular-cli: 1.0.0-beta.20-4
node: 6.9.1

Request

It would be very helpful if angular-cli did provide an option to receive output of webpack --json during ng build for further analysis of webpack chunks and code size (e.g. using the excellent webpack-visualizer: https://chrisbateman.github.io/webpack-visualizer/ or https://webpack.github.io/analyse/)

@Destreyf
Copy link

@JohannesRudolph I think this is a great idea for being able to produce dumps of information, in an attempt to see if it was possible, i ended up modifying 1 file and installing 1 package.

For those willing to play around with their node_modules for some fun, replace node_modules/angular-cli/models/webpack-config.js with this raw gist or you can view the gist

and then run npm install --save-dev webpack-stats-plugin and then whenever you do a build the stats are dumped in the outDir (typically dist/stats.json).

@filipesilva
Copy link
Contributor

I agree that this would be helpful, but am unsure if we want to do it anytime soon because it would break the build system abstraction.

@filipesilva filipesilva added P5 The team acknowledges the request but does not plan to address it, it remains open for discussion feature Issue that requests a new feature labels Dec 22, 2016
@Destreyf
Copy link

@filipesilva I agree this would be nice to have, the build system functioning is definitely more important than some stats, i would opt for a having people make the simple change i made if the stats are important to them (maybe for integration purposes). I've definitely grown accustomed to using the CLI and openly hacking away at anything that i'm curious on.

asnowwolf pushed a commit to asnowwolf/angular-cli that referenced this issue Apr 12, 2017
Allows you to run ng build --json which generates dist/stats.json. This can then be used with things like the webpack-bundle-analyzer or https://webpack.github.io/analyse/

Fix angular#3179
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Issue that requests a new feature P5 The team acknowledges the request but does not plan to address it, it remains open for discussion
Projects
None yet
Development

No branches or pull requests

3 participants