javascript - angular-cli使用ng build --prod 和ng build --prod --aot 打包文件大小相同?
本文介绍了javascript - angular-cli使用ng build --prod 和ng build --prod --aot 打包文件大小相同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
我的完整项目使用ng build --prod编译后大小是1713k,如图所示
使用ng build --prod --aot 之后大小还是1713k;
--aot 还需要别的配置参数才能有效吗?
4.或者说,使用--aot参数之前,还要进行摇树优化?
解决方案
--prod turns on AOT, you don't need to pass both options. See this section of the docs: https://github.com/angular/an...
这个是github上面,人家的回答,不知道有没有用。
这篇关于javascript - angular-cli使用ng build --prod 和ng build --prod --aot 打包文件大小相同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文