Use webpack bundle analyzer with Razzle
npm install razzle-plugin-bundle-analyzerThis package contains a plugin for using webpack-bundle-analyzer with Razzle
```
yarn add razzle-plugin-bundle-analyzer
Using the plugin with the default options
`js
// razzle.config.js
module.exports = {
plugins: ['bundle-analyzer'],
};
`
`js
// razzle.config.js
module.exports = {
plugins: [
{
name: 'bundle-analyzer',
options: {
target: 'web', // or 'node'
env: 'production', // or 'development'
bundleAnalyzerConfig: {},
},
},
],
};
`
target: _string_ (defaults: 'web')
env: _string_ (defaults: 'production')
bundleAnalyzerConfig: _bundleAnalyzerOptions_ (defaults: {})
Use this to override webpack-bundle-analyzer` options. Check all the options here: webpack-bundle-analyzer options.