Angular2 - What's a good 'dist' folder size?

Viewed 1181

Note

  • I'm new to this and have just been 'blagging' my way through writing this code

What I'm using - Angular (using Angular Cli) - Firebase

Issue / Concern

  • When I run 'ng build --watch' it creates a 'dist' folder. I've checked the size of the folder and it amounts to 11.4mb. This is what I need to upload to firebase.

Questions

  • Is this a massive file size?
  • How do I minify my files?
  • Based on the image below, do the 'map' files need to be included? If not, how do I remove them?
  • Any advice on running a build command for production?

enter image description here

Any help here would be hugely appreciated.

1 Answers

too late here but anything about 10mb is not a good bundle for dist and kills the load time. try to keep the size below 6mb if you have large files in your assets, explore the options to retrieve them from server. concat es5 es2015 if they are derived separately from you the build. run aot and build optimizers something like ng build --prod --aot --build-optimizer hope this helps.

Related