search

Home  >  Q&A  >  body text

javascript - Why is the size of angular-cli aot build significantly larger than that of aot serve?

ng build --aot -prod

The following is the file size (aot build)

ng serve --aot -prod

The following is the file size (aot serve)

The size of the build is really unacceptable. Why is the volume of aot serve packaged here significantly smaller than aot build? If this is the case, wouldn’t it be better for me to build a development environment on the server and then use aot serve to forward the request to the background? ?

What I understand as aot serve is to package it with aot build and start a web container for front-end development and debugging, so the size difference here is so big, which makes me very confused

Version information:

@angular/cli: 1.0.0
node: 6.9.1
os: darwin x64
@angular/animations: 4.0.0
@angular/common: 4.0.0
@angular/compiler: 4.0.0
@angular/core: 4.0.0
@angular/forms: 4.0.0
@angular/http: 4.0.0
@angular/platform-browser: 4.0.0
@angular/platform-browser-dynamic: 4.0.0
@angular/platform-server: 4.0.0
@angular/router: 4.0.0
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.0
怪我咯怪我咯2783 days ago646

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-05-15 17:15:40

    Send the configuration file and take a look

    reply
    0
  • Cancelreply