@constgen/neutrino-sourcemap
v1.9.2
Published
Neutrino middleware to configure source maps in JS and CSS
Downloads
9
Maintainers
Readme
@constgen/neutrino-sourcemap
Neutrino middleware that automatically enables necessary source maps in development and production
Features
- JS source maps
- CSS source maps
- NodeJS optimized source maps automatically enabled
- Chrome DevTools Workspace integration
- Consider external dependencies sourcemaps for better debugging during development
Requirements
- Node.js v10+
- Neutrino v9
- Webpack v4
Installation
@constgen/neutrino-sourcemap
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-sourcemap
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 sourcemap = require('@constgen/neutrino-sourcemap')
neutrino.use(sourcemap({
prod: false, // enable source maps in production
dev : true // enable source maps in development
}))
In neutrinorc
The middleware also may be used together with another presets in Neutrino rc-file, e.g.:
.neutrinorc.js
let sourcemap = require('@constgen/neutrino-sourcemap')
module.exports = {
use: [
sourcemap()
]
}