Skip to content

Hot reload of a monorepo React app #695

Answered by joeldenning
MV10 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there - glad to see people trying out Discussions.

Hot reloading requires that webpack-dev-server's runtime sets up a websocket connection to the webpack-dev-server for that project. It makes a request to a path on the server that's something like /web-socket/info (I don't remember the exact path). You should be able to see those in the network tab to confirm that they're each going to the correct port.

If you're using webpack 4, the web socket connection should open to the correct URL automatically if you let webpack find a port for each project, or if you hard code the port via CLI command --port 8080. However, it can sometimes not work if you set the port in the webpack config witho…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@jomgapuz
Comment options

@joeldenning
Comment options

@frehner
Comment options

Answer selected by MV10
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants