search

Home  >  Q&A  >  body text

javascript - angular-cli uses ng build --prod and ng build --prod --aot to package files with the same size?

  1. The size of my complete project after compilation using ng build --prod is 1713k, as shown in the picture

  2. After using ng build --prod --aot the size is still 1713k;

  3. --Does aot need other configuration parameters to be effective?

4. In other words, before using the --aot parameter, tree shaking optimization is also required?

天蓬老师天蓬老师2730 days ago876

reply all(2)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新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...
    This is the answer on github, no Know if it is useful.

    reply
    0
  • 世界只因有你

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

    --prod turns on --aot by default, so using --prod and --prod --aot are the same

    reply
    0
  • Cancelreply