Optimize the Bundle Size using Source Map Explorer

WHY ?

TOOLS

WHAT IS SOURCEMAP EXPLORER ?

WHY SOURCEMAP EXPLORER ?

PREREQUISITES

Generated files after giving build command.
Fig 1. Generated files after giving build command.
ng build --configuration=production

But Why 2 Bundles ?

Fig 2. Browserlist File
npm browserlist 
Fig 3. Supported Browsers for my application.
npm i source-map-explorer –-save-dev
Fig 4. Shortcut added in package.json File
npm run source-map-analyzer
npm run source-map-explorer
Fig 5. Bundle representation using Source Map Explorer without optimization.

OPTIMZATION 1:

Fig 6. Updated Browserslist
Fig 8. Updated Bundle size representation after optimization 1

OPTIMIZATION 2:

Fig 9 . Bundle Representation after Optimization 2

CONCLUSION:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store