Browse Source

add source maps for dev/production (#2873)

closed-social-v3
Nolan Lawson 7 years ago
committed by Eugen Rochko
parent
commit
d372068620
2 changed files with 5 additions and 2 deletions
  1. +1
    -1
      config/webpack/development.js
  2. +4
    -1
      config/webpack/production.js

+ 1
- 1
config/webpack/development.js View File

@ -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

+ 4
- 1
config/webpack/production.js View File

@ -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]',

Loading…
Cancel
Save