Skip to content

HMR doesn't work after reconnect on Webpack restart  #220

@constgen

Description

@constgen
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions