Analyze Webpack Npm Packages File Size

Sep 16, 2017
Use webpack-bundle-analyzer

Install webpack-bundle-analyzer.

npm install --save-dev webpack-bundle-analyzer

Edit webpack config file.

const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPluginmodule.exports = {  ...  plugins: [    ...    new BundleAnalyzerPlugin()  ]  ...};

Output is generated at as a graph to share breakdown of file size for each packages.


❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.