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

View File

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