From d372068620c708dcfa4500936d90a0e68556068e Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 7 May 2017 06:22:30 -0700 Subject: add source maps for dev/production (#2873) --- config/webpack/development.js | 2 +- config/webpack/production.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'config/webpack') diff --git a/config/webpack/development.js b/config/webpack/development.js index 7dfa2df11..398fcffe3 100644 --- a/config/webpack/development.js +++ b/config/webpack/development.js @@ -4,7 +4,7 @@ const merge = require('webpack-merge') const sharedConfig = require('./shared.js') module.exports = merge(sharedConfig, { - devtool: 'sourcemap', + devtool: 'cheap-module-eval-source-map', stats: { errorDetails: true diff --git a/config/webpack/production.js b/config/webpack/production.js index 494ccf7ef..261bfdd70 100644 --- a/config/webpack/production.js +++ b/config/webpack/production.js @@ -8,6 +8,9 @@ const CompressionPlugin = require('compression-webpack-plugin') const sharedConfig = require('./shared.js') module.exports = merge(sharedConfig, { + + devtool: 'source-map', // separate sourcemap file, suitable for production + output: { filename: '[name]-[chunkhash].js' }, plugins: [ @@ -19,7 +22,7 @@ module.exports = merge(sharedConfig, { comments: false }, - sourceMap: false + sourceMap: true }), new CompressionPlugin({ asset: '[path].gz[query]', -- cgit