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

use command ng build --prod and ng build --prod --aot,come to the same thing #6868

Closed
dczxw opened this issue Jul 3, 2017 · 5 comments
Closed

Comments

@dczxw
Copy link

dczxw commented Jul 3, 2017

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 ?

@dczxw dczxw changed the title ng build --prod and ng build --prod --aot use command ng build --prod and ng build --prod --aot,come to the same thing Jul 3, 2017
@17cupsofcoffee
Copy link

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

@Brocco
Copy link
Contributor

Brocco commented Jul 17, 2017

@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: ☕️☕️☕️☕️☕️☕️☕️☕️☕️☕️☕️☕️☕️☕️☕️☕️☕️

@Brocco Brocco closed this as completed Jul 17, 2017
@factoidforrest
Copy link

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

@17cupsofcoffee
Copy link

@light24bulbs See #8259

@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
None yet
Projects
None yet
Development

No branches or pull requests

4 participants