Closed beckend closed 5 years ago
I am using the dev container by the way. And Koa
If a node bundle exports an http server instance, the container tries to decorate the request listener: it uses webpack-hot-middleware if option
hmr
is enabled (source).
In other words, when a main entry point of a webpack config with target "node" exports an http server instance: the dev container try to mount webpack-hot-middleware on path /__webpack_hmr
.
Try to export an http server instance on your node entry point and check path /__webpack_hmr
on your server to see if it returns something else than an 404 code.
This path is provided by webpack-hot-middleware as a server sent events and use it to allow HMR on client.
I see, i got it working, thanks
I do not see that it's starting a server of any kind, how would the setup look like to enable HMR on browser client?