简体   繁体   English

如何在 angular2 中禁用 AOT?

[英]How can I disable AOT in angular2?

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

Update: For Angular 6+更新:对于 Angular 6+

Use the following command to disable AOT mode:使用以下命令禁用 AOT 模式:

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

Just run command ng build -prod -aot=false .只需运行命令ng build -prod -aot=false This will disable the aot compiler.这将禁用 aot 编译器。

The flag --prod does the AOT compilation by default.默认情况下,标志--prod执行 AOT 编译。 If you want to build without AOT then simply run ng build only without any flag.如果你想在没有 AOT 的情况下构建,那么只需运行ng build不带任何标志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM