I am working on Angular 5 project with the angular cli. I have used some npm modules in the development of the website. When i create the production build it is generating vendor.js with the size in the MBs, because of that the site is loading very slow when user opens it for the first time.
I have tried adding some extra arguments while making build ng build --prod --aot --buildOptimizer
but still it's size is pretty large compare to other files.
Is there any way in webpack I can split the vendor.js in multiple files or reduce the file or lazy load the vendor.js files?