added source maps to dev

This commit is contained in:
Danny Coates 2017-08-27 15:19:58 -07:00
parent 182bde30fa
commit 57012f0660
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
1 changed files with 3 additions and 4 deletions

View File

@ -2,6 +2,7 @@ const path = require('path');
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const IS_DEV = process.env.NODE_ENV === 'development';
module.exports = {
entry: {
@ -13,6 +14,7 @@ module.exports = {
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
},
devtool: IS_DEV && 'inline-source-map',
module: {
rules: [
{
@ -141,9 +143,6 @@ module.exports = {
],
devServer: {
compress: true,
setup:
process.env.NODE_ENV === 'development'
? require('./server/dev')
: undefined
setup: IS_DEV ? require('./server/dev') : undefined
}
};