How to decrease size of vendor.js in angular 2,4,6,7,8,9,10?

Mohamad Shiralizadeh picture Mohamad Shiralizadeh · Jul 10, 2018 · Viewed 30.6k times · Source

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?

Answer

molikh picture molikh · Jul 10, 2018

You mean how to decrease? This file includes all libraries that you added into your project. If you build your app on production mode it'll be much lower.

ng build --prod

If it's not your answer, explain more what you are looking for.