How can I disable AOT in angular2?

2019-03-30 01:57发布

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

3条回答
劫难
2楼-- · 2019-03-30 02:33

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

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-03-30 02:38

Update: For Angular 6

Use the following command to disable AOT mode:

$ ng build --prod --aot=false --build-optimizer=false
查看更多
别忘想泡老子
4楼-- · 2019-03-30 02:40

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.

查看更多
登录 后发表回答