Hi @medihack!
Thanks for reporting this problem. I haven’t had time to look into a workaround, but maybe there is still something we can do to make live-reload work for Blitz (e.g. with some extra configuration).
If it helps, my usual process goes something like this:
- Open the web preview in a new tab
- Open the Network dev tool
- Look for failed network requests that look like HMR is trying to connect to the wrong place (sometimes you need to wait for some time, or to make some minor change in the code to trigger it)
If your workspace is red-fox-abcd
, your web app runs on port 3000
and HMR on port 3001
, you’ll typically see that the front-end tries to connect to 3000-red-fox-abcd:3001
(fails/unsupported) instead of 3001-red-fox-abcd:443
(expected).
Sometimes there is a way to configure HMR to work through a proxy (i.e. HMR server runs on localhost:3001
, but the front-end web app knows to use 3001-red-fox-abcd:443
instead).
Additionally, I’ve requested a design change/simplification that might fix this entire class of problems (secondary servers on different ports, e.g. HMR/live-reload servers) by exposing ports directly on the root workspace domain and not a separate/“unexpected” domain:
Let’s see if this is something we can reasonably get into the roadmap, or if the change is too involving for now.
If not, we’ll have to continue with the workarounds (some of which are briefly described in the issue).