webpack-blocks-server-source-map
v0.2.0
Published
A webpack block that adds source map support to server bundle
Downloads
190
Maintainers
Readme
webpack-blocks-server-source-map
A webpack block that adds source map support to server bundle.
Install
$ npm install --save-dev webpack-blocks-server-source-map
Usage
const { createConfig } = require('@webpack-blocks/webpack2')
const serverSourceMap = require('webpack-blocks-server-source-map')
module.exports = createConfig([
serverSourceMap()
])
How it does
- changes
devtool
tosourcemap
; - inserts
require("source-map-support").install();
at the top of generated server files to requiresource-map-support
and enable source map.
For more details, see src/index.js
.
API
serverSourceMap
Adds source map support to server bundle.
Parameters
devtool
string? (optional, default'source-map'
)
Returns Function webpack block
Other useful webpack blocks
License
MIT © Diego Haz