A webpack block that adds source map support to server bundle.
$ npm install --save-dev webpack-blocks-server-source-map
const { createConfig } = require('@webpack-blocks/webpack2')
const serverSourceMap = require('webpack-blocks-server-source-map')
module.exports = createConfig([
serverSourceMap()
])
- 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
.
Adds source map support to server bundle.
Parameters
devtool
string? (optional, default'source-map'
)
Returns Function webpack block
MIT © Diego Haz