@bundle-analyzer/webpack-plugin
Version:
Bundle Analyzer webpack plugin.
45 lines (28 loc) ⢠812 B
Markdown
Official webpack plugin compatible with [Bundle Analyzer service](https://www.bundle-analyzer.com).
```
npm install --save-dev @bundle-analyzer/webpack-plugin
```
**webpack.config.js**
```js
const BundleAnalyzerPlugin = require('@bundle-analyzer/webpack-plugin')
module.exports = {
entry: 'index.js',
output: {
path: __dirname + '/dist',
filename: 'index_bundle.js',
},
plugins: [new BundleAnalyzerPlugin({ token: 'Your repository token' })],
}
```
You can specify the token using options or environment variable `BUNDLE_ANALYZER_TOKEN`.
You can specify a custom configuration file.
š [See full documentation](https://docs.bundle-analyzer.com/)
MIT