@constgen/neutrino-dependency
Neutrino middleware for detection and warning about dependencies issues
You may want to use @constgen/neutrino-analysis
that already includes this middleware
Features
- Detect and warn about circular dependencies during the build time
- Detect and warn about duplicated dependencies during the build time
- Enforce the entire path of all required modules match exact case of the actual path on disk
Requirements
- Node.js v10+
- Neutrino v9
- Webpack v4
Installation
@constgen/neutrino-dependency
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-dependency
Usage
In preset
Require this package and plug it into Neutrino. The middleware has no options:
let dependency = require('@constgen/neutrino-dependency')
neutrino.use(dependency())
In neutrinorc
The middleware also may be used together with another presets in Neutrino rc-file, e.g.:
.neutrinorc.js
let dependency = require('@constgen/neutrino-dependency')
module.exports = {
use: [
dependency()
]
}