Next.js Discord

Discord Forum

HMR with multi-zone

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
Running my multi-zone project in local dev using middleware to rewrite all /client paths from the app that is the site to the app that is the web client for logged -in users. HMR works on the main site, but I always get the following error when going to /client...

use-websocket.js:42 WebSocket connection to 'ws://localhost/client/_next/webpack-hmr' failed

... and no HMR.

If I hit the server/port for the client app directly, HMR works just fine. What is the simplest way to allow the websocket connection for HMR to work properly for the redirected app in this configuration?

0 Replies