added source maps to dev
This commit is contained in:
parent
182bde30fa
commit
57012f0660
1 changed files with 3 additions and 4 deletions
|
@ -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
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue