diff --git a/config/webpack.config.client.dev.js b/config/webpack.config.client.dev.js index 5df0411..f47b8ad 100644 --- a/config/webpack.config.client.dev.js +++ b/config/webpack.config.client.dev.js @@ -9,7 +9,9 @@ const paths = require('./paths'); const base = require('./webpack.config.base'); -base.entry = [ +const config = Object.assign({}, base) + +config.entry = [ // Include an alternative client for WebpackDevServer. A client's job is to // connect to WebpackDevServer by a socket and get notified about changes. // When you save a file, the client will either apply hot updates (in case @@ -32,7 +34,7 @@ base.entry = [ // changing JS code would still trigger a refresh. ] -base.output = { +config.output = { // Next line is not used in dev but WebpackDevServer crashes without it: path: paths.appBuild, // Add /* filename */ comments to generated require()s in the output. @@ -45,12 +47,14 @@ base.output = { chunkFilename: 'static/js/[name].chunk.js', // This is the URL that app is served from. We use "/" in development. publicPath: '/', + hotUpdateChunkFilename: 'static/[id].[hash].hot-update.js', + hotUpdateMainFilename: 'static/[hash].hot-update.json', // Point sourcemap entries to original disk location devtoolModuleFilenameTemplate: info => path.resolve(info.absoluteResourcePath), } -base.module.rules = base.module.rules.concat([ +config.module.rules = config.module.rules.concat([ // "postcss" loader applies autoprefixer to our CSS. // "css" loader resolves paths in CSS and adds assets as dependencies. // "style" loader turns CSS into JS modules that inject