Skip to content

Commit 4178f64

Browse files
committed
fixing 2 issues related to webpack-dev-server and HMR - fixes #931
1 parent c4e3fd2 commit 4178f64

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/config-generator.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,16 @@ class ConfigGenerator {
597597
headers: { 'Access-Control-Allow-Origin': '*' },
598598
compress: true,
599599
historyApiFallback: true,
600+
// In webpack-dev-server v4 beta 0, liveReload always causes
601+
// the page to refresh, not allowing HMR to update the page.
602+
// This is somehow related to the "static" option, but it's
603+
// unknown if there is a better option.
604+
// See https://github.com/webpack/webpack-dev-server/issues/2893
605+
liveReload: false,
606+
client: {
607+
// see https://github.com/symfony/webpack-encore/issues/931#issuecomment-784483725
608+
host: this.webpackConfig.runtimeConfig.devServerHost,
609+
}
600610
};
601611

602612
return applyOptionsCallback(

0 commit comments

Comments
 (0)