Webpack bundle analyzer

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

I am using bud version 6.5.0.


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!

1 Like