webpack-hot-client icon indicating copy to clipboard operation
webpack-hot-client copied to clipboard

reload is broken

Open alexander-akait opened this issue 7 years ago • 6 comments

  • Operating System: Ubuntu 18.04
  • Node Version: 8.11.3
  • NPM Version: 6.2.0
  • webpack Version: 4.16.1
  • webpack-hot-client Version: 4.1.1

Expected Behavior

Page doesn't reload.

Actual Behavior

Page should reload.

Code

https://github.com/webpack-contrib/webpack-serve/blob/master/docs/addons/static-content-options.config.js

How Do We Reproduce?

  1. Run example above.
  2. Change something in app.js (page has not been reloaded, because initial: true -> https://github.com/webpack-contrib/webpack-hot-client/blob/master/lib/client/index.js#L30 and https://github.com/webpack-contrib/webpack-hot-client/blob/master/lib/client/index.js#L78)
  3. Change something again (page has been reloaded, all fine)
  4. Change again something in app.js (page has not been reloaded, because after reload page initial was setted in true https://github.com/webpack-contrib/webpack-hot-client/blob/master/lib/client/index.js#L30)

Related problem with css (style-loader and css-loader) - first change not applied because initial: true.

alexander-akait avatar Jul 17 '18 19:07 alexander-akait

@shellscape found problem, i have external WebSocket (use ws@5 version) client and communicate with webpack-hot-client web socket server, but in webpack-hot-client we use ws@4, it is break web sockets :confused: :disappointed:

What is blocker for update their? We use in own app ws@5 and can't downgrade, also we need communicate with webpack-hot-client web socket server

alexander-akait avatar Jul 17 '18 21:07 alexander-akait

The server is supposed to be standards compliant, so I don't know why it would break. You'll have to investigate.

shellscape avatar Jul 17 '18 21:07 shellscape

@shellscape problem with compatibility ws@5 and ws@4.

If you use WebSocket.Server from ws@4 and WebSocket (client) from ws@5. WebSocket.Server is freeze after connection. I do not understand deeply ws code. Can we upgrade ws to 5 version?

This makes impossible to use in one application ws (latest stable version - 5.2.2) and webpack-serve

alexander-akait avatar Jul 17 '18 21:07 alexander-akait

Maybe, but WebSocket.Server in ws@5 needs to be backwards compatible. I'd check with the ws project about both back compat, and the problem you're facing now.

shellscape avatar Jul 17 '18 21:07 shellscape

Yeah I tried running this example from webpack-serve and it doesn't work anymore, not even after using [email protected]

marcofugaro avatar Aug 11 '18 16:08 marcofugaro

Have the same issue. The hot reload is not working in two different projects - i'm pretty sure the only thing that has been changed was me upgrading to ubuntu 18.04.

Webpack hot realod works, hot reload inside my react app stopped working. Works after rebooting my laptop and stop working again after couple of minutes.

shaytidhar avatar Aug 29 '18 11:08 shaytidhar