# Webpack bundle analyzer

**URL:** https://discourse.roots.io/t/webpack-bundle-analyzer/24355
**Category:** bud
**Tags:** bud, webpack, sage10
**Created:** 2022-12-05T08:43:02Z
**Posts:** 2

## Post 1 by @avior — 2022-12-05T08:43:02Z

Hi,  
How can we add bundle analyzer to the current bud config?  
This is the link of the plugin:

> **[GitHub - webpack-contrib/webpack-bundle-analyzer: Webpack plugin and CLI...](https://github.com/webpack-contrib/webpack-bundle-analyzer)**
>
> Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap - GitHub - webpack-contrib/webpack-bundle-analyzer: Webpack plugin and CLI utility that repr...

I am using bud version 6.5.0.

Thanks

---

## Post 2 by @avior — 2022-12-05T19:55:49Z

I have found the solution for it  
For anyone whom interested:

Add this at the top of your bud config  
`import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer';`

Add this to your bud extensions:  
`await app.extensions.add(new BundleAnalyzerPlugin())`

Make sure you run it only in development!
