Angular CLI creates vendor.js
and I don't know Why and What is the use of it?? Size of this file is about 3.2MB for a new app!!
Does this file contains Angular 6 Javascript Source?
Don't you think this is big file for loading on internet on low speed connections?
Angular is a very opinionated and robust framework. As a result, Angular apps generally have bigger bundle sizes when compared to apps written using other JavaScript frameworks like React. The Angular framework comes with a lot of useful libraries already included within it, such as RxJs and Zone.
vendor. js : third-party code that your application depends on. polyfills. js : polyfills that allow using newer features in older environments (e.g., using Angular on outdated Web browsers)
I checked many apps built with Angular and have a feeling that most medium size enterprise apps should have main. *. js under 500 KB, on average 250KB. If your bundle size largely exceed those numbers, you may need to be aware.
runtime.js is the webpack loader. This file contains webpack utilities that are needed to load other files. styles.css contains all styles we declare in styles section of angular.json file "styles": [ "src/styles.css", "src/my-custom.css"
This file includes all libraries that you added into your project. If you build your app on production mode the file size will be smaller.
ng build --prod
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With