import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
webpackChain(chain, _webpack) {
chain.resolve.plugin('webpack-bundle-analyzer').use(BundleAnalyzerPlugin())
// TypeError: Class constructor BundleAnalyzerPlugin cannot be invoked without 'new'
}
What is the correct usage?