Skip to content

The difference between ng build --prod and ng build --configuration=production is unclear. #12898

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

Closed
sebastian-zarzycki-apzumi opened this issue Nov 8, 2018 · 3 comments
Labels
area: docs Related to the documentation

Comments

@sebastian-zarzycki-apzumi
Copy link

sebastian-zarzycki-apzumi commented Nov 8, 2018

On https://angular.io/cli/build, it says:

When true, sets the build configuration to the production environment. 
All builds make use of bundling and limited tree-shaking. 
A production build also runs limited dead code elimination using UglifyJS.

Which begins to explain one thing and then changes subjects, while using old name convention (environment vs configuration). Now, in new CLI, with angular.json, it would seem to me, that all configuration specifies its own build parameters and it is controlled from there. Are there other "optimizations" connected solely to --prod switch, that are not in angular.json?

Is --prod:
a) just an alias for --configuration=production
b) an alias for --configuration=production, as well as flag for other optimizations, that are not connected to what is specified in angular.json file?

@sebastian-zarzycki-apzumi sebastian-zarzycki-apzumi changed the title The difference between ng build --prod and ng-build --configuration=production is unclear. The difference between ng build --prod and ng build --configuration=production is unclear. Nov 8, 2018
@alan-agius4
Copy link
Collaborator

alan-agius4 commented Nov 8, 2018

Hi, --prod is an alias for --configuration=production and there is nothing more to it.

There is currently a PR to improve this doc #12837

@alan-agius4 alan-agius4 added the area: docs Related to the documentation label Nov 8, 2018
@sebastian-zarzycki-apzumi
Copy link
Author

That's a speedy response, much appreciated!

@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: docs Related to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants