javascript - angular-cli使用ng build --prod 和ng build --prod --aot 打包文件大小相同?

查看:93
本文介绍了javascript - angular-cli使用ng build --prod 和ng build --prod --aot 打包文件大小相同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

  1. 我的完整项目使用ng build --prod编译后大小是1713k,如图所示

  2. 使用ng build --prod --aot 之后大小还是1713k;

  3. --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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆