我开发了一个Ionic2应用程序,当我使用
构建它时它运行顺畅ionic cordova build android
但是当我尝试使用--prod标志构建它时,即
ionic cordova build android --prod
它出现以下错误
[18:09:32] build prod started ...
[18:09:32] clean started ...
[18:09:32] clean finished in 63 ms
[18:09:32] copy started ...
[18:09:32] deeplinks started ...
[18:09:33] deeplinks finished in 1.04 s
[18:09:33] ngc started ...
[18:10:00] typescript error
src\app\app.module.ts(287,19): Error during template compile of 'AppModule' Expression form not supported.
Error: The Angular AoT build failed. See the issues above
at D:\aafia\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:237:55
at step (D:\aafia\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:32:23)
at Object.next (D:\aafia\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:13:53)
at fulfilled (D:\aafia\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:4:58)
注意:我使用的是ionic-cli 3.20.0