@constgen/neutrino-analysis
Neutrino middleware that adds bundle analysis tools
Requirements
- Node.js v10+
- Neutrino v9
- Webpack v4
Installation
@constgen/neutrino-analysis
can be installed from NPM. You should install it to "dependencies"
(--save) or "devDependncies"
(--save-dev) depending on your goal.
npm install --save @constgen/neutrino-analysis
Usage
In preset
Require this package and plug it into Neutrino. The following shows how you can pass an options object to the middleware, showing the defaults:
let analysis = require('@constgen/neutrino-analysis')
neutrino.use(analysis({
dependencies : true,
bundleAnalyzer: true
}))
In neutrinorc
The middleware also may be used together with another presets in Neutrino rc-file, e.g.:
.neutrinorc.js
let analysis = require('@constgen/neutrino-analysis')
module.exports = {
use: [
analysis()
]
}