How can I disable AOT in angular2?

11,015

Solution 1

Update: For Angular 6+

Use the following command to disable AOT mode:

$ ng build --prod --aot=false --build-optimizer=false

Solution 2

Just run command ng build -prod -aot=false. This will disable the aot compiler.

Solution 3

The flag --prod does the AOT compilation by default. If you want to build without AOT then simply run ng build only without any flag.

Share:
11,015
jesusverma
Author by

jesusverma

Updated on June 13, 2022

Comments

  • jesusverma
    jesusverma almost 2 years

    I got something like this:

    ng build --prod --no-aot
    

    But I am not able to understand what is the difference between

    ng build --prod  
    

    and

    ng build --prod --no-aot