angularwebpack-production

How to optimize vendor.bundle.js file size and startup loading using webpack and angular2/4


I have vendor.bundle.js of 6MB size. I am using webpack configuration, how to reduce the size of vendor.bundle.js to optimize the load performance. I have achieved the performance for rest of file only my vendor.bundle.js is taking time to load apprx 7 to 8sec. Does anyone can help on this. Is there a way to skip vendor.bundle.js on load.


Solution

  • I have reduced the size of vendor.bundle as two npm libraries included the data within the js itself so size was taking up 6mb so removed the library. Now the size is 890KB