Angular-cli: use command ng build --prod and ng build --prod --aot,come to the same thing

Created on 3 Jul 2017  路  5Comments  路  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

   "ng": "ng",
    "build": "ng build --prod --aot",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",

Versions.

angular-cli: 1.0.0-beta.28.3
node: 8.0.0
os: win32 x64
@angular/animations: 4.2.5
@angular/common: 4.2.5
@angular/compiler: 4.2.5
@angular/core: 4.2.5
@angular/forms: 4.2.5
@angular/http: 4.2.5
@angular/material: 2.0.0-beta.7
@angular/platform-browser: 4.2.5
@angular/platform-browser-dynamic: 4.2.5
@angular/router: 4.2.5
@angular/cli: 1.0.0-beta.28.3
@angular/compiler-cli: 4.2.5

Repro steps.

I want to use this angular-cli for AOT,but when I use this command "ng build --prod" or "ng build -- prod --aot",they come to same things;The two file sizes are the same;

And angular-cli need to set somethings for --aot ?

Most helpful comment

@17cupsofcoffee is correct, turning on --prod automatically turns on --aot. Closing this issue.

Side note: personally, I feel that 17 鈽曪笍 is a bit extreme, but to each their own.
see what I mean: 鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍

All 5 comments

--prod turns on AOT, you don't need to pass both options. See this section of the docs: https://github.com/angular/angular-cli/wiki/build#--dev-vs---prod-builds

@17cupsofcoffee is correct, turning on --prod automatically turns on --aot. Closing this issue.

Side note: personally, I feel that 17 鈽曪笍 is a bit extreme, but to each their own.
see what I mean: 鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍鈽曪笍

isn't angular 5 supposed to be AOT on by default?

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbeckton picture jbeckton  路  3Comments

JanStureNielsen picture JanStureNielsen  路  3Comments

daBishMan picture daBishMan  路  3Comments

brtnshrdr picture brtnshrdr  路  3Comments

jmurphzyo picture jmurphzyo  路  3Comments