Skip to content

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

Closed
@sebastian-zarzycki-apzumi

Description

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: docsRelated to the documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions