webpack-dev-server: HMR not working and logging "Waiting for update signal from WDS"
[HMR] Waiting for update signal from WDS…
- Operating System: macOS
- Node Version: v12.6.0
- NPM Version: 6.9.0
- webpack Version: 4.38.0
- webpack-dev-server Version: 3.7.2
- Browser: Chrome or Firefox
- This is a bug
- This is a modification request
Code
Instructions for reproducible test repo (link):
git clone git@github.com:marcofugaro/hmr-test-repo.git
cd hmr-test-repo
npm i
npm start
webpack.config.js:
module.exports = {
mode: 'development',
devServer: {
host: '0.0.0.0',
port: '8080',
publicPath: '/',
contentBase: './public/',
watchContentBase: true,
watchOptions: {
ignored: /node_modules/,
},
// enable HMR
hot: true,
hotOnly: true,
},
plugins: [
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin({
inject: true,
template: './public/index.html',
}),
],
}
Expected Behavior
HMR should work
Actual Behavior
The message [HMR] Waiting for update signal from WDS...
appears in the console and the HMR is broken, when editing a file:

About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 17 (7 by maintainers)
@marcofugaro
You can do it by following steps
if(level === "info")
)Hey I would suggest restart the server
it just started now. it was running just fine all of the sudden. gone wrong.
[HMR] Waiting for update signal from WDS… client:48 [WDS] Hot Module Replacement enabled. client:52 [WDS] Live Reloading enabled. facing this error
Remove
webpack.HotModuleReplacementPlugin
, use onlyhot
(no needhot
andhotOnly
), also don’t open browser inafter
, it is not hook for this, please read docs about options for webpack-dev-server