Skip to content

ng build --prod warning is confusing #20806

Closed
@StephenFluin

Description

@StephenFluin

🐞 Bug report

Command (mark with an x)

  • build

Is this a regression?

Yes, as part of the new default for ng build.

Description

Previously developers were expected to run ng build --prod, when you do so now you get the warning $ ng build --prod Option "--prod" is deprecated: Use "--configuration production" instead., but this warning is confusing. As a developer I'm not actually supposed to use --configuration production, but instead ng build. Perhaps we could mention the new default?

🔬 Minimal Reproduction

npx @angular/cli new my-app
cd my-app
ng build --prod

🔥 Exception or Error


Option "--prod" is deprecated: Use "--configuration production" instead.

## 🌍 Your Environment


Angular CLI: 12.0.0
Node: 14.16.0
Package Manager: yarn 1.22.10
OS: linux x64

Angular: 12.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.13
@angular-devkit/build-angular   12.0.0
@angular-devkit/core            12.0.0
@angular-devkit/schematics      12.0.0
@angular/fire                   6.1.4
@schematics/angular             12.0.0
rxjs                            6.6.7
typescript                      4.2.4

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions