Skip to content

Commit

Permalink
fix hot reloading on docker
Browse files Browse the repository at this point in the history
  • Loading branch information
wootsaejao committed Oct 11, 2016
1 parent c97a0ed commit 48c933e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"server",
"Intl"
],
"legacyWatch": true,
"env": {
"NODE_ENV": "development"
},
Expand Down
8 changes: 7 additions & 1 deletion server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ const app = new Express();
// Run Webpack dev server in development mode
if (process.env.NODE_ENV === 'development') {
const compiler = webpack(config);
app.use(webpackDevMiddleware(compiler, { noInfo: true, publicPath: config.output.publicPath }));
app.use(webpackDevMiddleware(compiler, {
noInfo: true,
publicPath: config.output.publicPath,
watchOptions: {
poll: 1000,
},
}));
app.use(webpackHotMiddleware(compiler));
}

Expand Down

0 comments on commit 48c933e

Please sign in to comment.