登陆

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参数之前,还要进行摇树优化?

# JavaScript
天蓬老师天蓬老师1574 天前364 次浏览

全部回复(2)我要回复

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-07-05 10:41:00

    --prod turns on AOT, you don't need to pass both options. See this section of the docs: https://github.com/angular/an...
    这个是github上面,人家的回答,不知道有没有用。

    回复
    0
  • 世界只因有你

    世界只因有你2017-07-05 10:41:00

    --prod 默认 开启了--aot ,所以在使用--prod 和 --prod --aot一样啦

    回复
    0
  • 取消回复发送