Closed
Description
We run webpack through a rails application and a gem called webpacker
We there for run our webserver at one port, but our dev server on another port.
Because the websocket just uses window.localtion.port
(https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/master/src/runtime/createSocket.js#L26) it tries to connect to our web server port, not our web socket port.
This could be fixed a few ways.
- You could allow a customer port to be passed to createSocket
- You could use the port that is specified in webpack-dev-server's config
sockPort
(https://webpack.js.org/configuration/dev-server/#devserversockport), with a fall back webpack-dev-serversport
and finally a fall back towindow.localtion.port
This may also solve #36
Metadata
Metadata
Assignees
Labels
No labels