webpack-plugin-serve icon indicating copy to clipboard operation
webpack-plugin-serve copied to clipboard

HMR doesn't work after reconnect on Webpack restart

Open constgen opened this issue 3 years ago • 0 comments

  • Webpack Version: 4
  • Operating System (or Browser): Windows 10
  • Node Version: 12
  • webpack-plugin-serve Version: 1.3.0

How Do We Reproduce?

I am using these options in Plugin config

{
  hmr: true,
  client: {
    retry: true
  }
}
  1. Then I change something
  2. Stop Webpack
  3. Change something else
  4. Start Webpack again
  5. Change something else again

In the console I see

⬡ wps: Hot Module Replacement is active
⬡ wps: WebSocket connected 
⬡ wps: Build 7dff02d replaced:
...
⬡ wps: The WebSocket was closed and will attempt to reconnect
Error: Firefox can't connect to the server ws://192.168.31.5:3000/wps.
⬡ wps: WebSocket connected 

Expected Behavior

On resarting Webpack the webpage should reconnect and refresh to display content that was changed between restarts. On all following changes HMR should hot reload the app

Actual Behavior

The page reconnects but doesn't hot reload or live reload

constgen avatar Mar 18 '21 20:03 constgen