fix sourcemap config

This commit is contained in:
Nolan Lawson 2018-03-04 16:42:04 -08:00
parent 4220e61042
commit d6073e33ff

View file

@ -51,8 +51,7 @@ module.exports = {
node: { node: {
setImmediate: false setImmediate: false
}, },
plugins: [ plugins: isDev ? [
].concat(isDev ? [
new webpack.HotModuleReplacementPlugin() new webpack.HotModuleReplacementPlugin()
] : [ ] : [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
@ -72,6 +71,6 @@ module.exports = {
openAnalyzer: false, openAnalyzer: false,
logLevel: 'silent' // do not bother Webpacker, who runs with --json and parses stdout logLevel: 'silent' // do not bother Webpacker, who runs with --json and parses stdout
}) })
]).filter(Boolean), ],
devtool: isDev && 'inline-source-map' devtool: isDev ? 'cheap-module-source-map' : 'source-map'
} }