--hmr-host is not available
See original GitHub issue🐛 bug report
I’m trying to configure the host that hot module replacement responds, since I am developing in a remote machine but accessing from local browser.
🎛 Configuration (.babelrc, package.json, cli command)
Zero configuration
🤔 Expected Behavior
Running parcel serve ... --host 0.0.0.0 --hot-host 12.34.56.78 should make the hot module replacement connect to the socket in wss://12.34.56.78:1234 instead of wss://127.0.0.1:1234 or wss://0.0.0.0:1234
😯 Current Behavior
It errors with
error: unknown option '--hot-host'
Even if prepending --hot it does not work:
error: unknown option '--hot-host'
However, the README states those flags exist, and I see that HMRRuntime.js tries to use these. I assume that --hot-port will also not work.
🌍 Your Environment
| Software | Version(s) |
|---|---|
| Parcel | v2.0.0-nightly.429 |
| Node | v14.12.0 |
| npm/Yarn | v1.22.5 |
| Operating System | Ubuntu 20.04.1 LTS |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:8 (5 by maintainers)
Top Results From Across the Web
CLI - Parcel
The watch command is similar to serve , but does not start a dev server (only a HMR server). However, it automatically rebuilds...
Read more >Laravel Vite Issue - Laracasts
I read #28 issue, but not sure that it's my case. I downloaded "use-hmr-host-when-set" branch files, then compile it by running run npm...
Read more >Laravel (Sail): Vite Dev Server not found (404) - Stack Overflow
Im using laravel-vite, latest Laravel9 BUT same issue! endless 404. – ofumbi. Jul 10 at 19:35 · @ofumbi - Check that config.server.hmr.host is ......
Read more >Laravel Mix HMR with HTTPS | Codecourse Blog
If that's you too, here's a guide on how to get it working flawlessly. ... That fixes the hostname, but not the HTTPS...
Read more >Versatile Multiscale Milestoning Utilizing the OpenMM ...
spatial reach available to the computational biophysics ... being observed, an issue that was not present for the MMVT-. SEEKR version.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I agree it needs
--hmr-host.I’m running parcel behind a reverse proxy of another host, so specifying
--hostas the exposed host will fail saying that it cannot bind to that IP address.What would work is the host for binding should be different from the host that parcel connects to from the browser.
Also,
parcel watch --host 127.0.0.1doesn’t work as it still keeps on listening to all the interfaces as I assumed this will change the IP it binds to according to the documentation.Ideally,
parcel watch --host 127.0.0.1 --hmr-host wss://host.browser.connects.to:443would make parcel listen to127.0.0.1while the browser connects towss://host.browser.connects.to:443with its HMR. (I’m specifying the full URL, since it implies even though parcel is running without https locally, the exposed reverse proxy host has ssl termination and needs to be connected with https. Perhaps--hmr-connectwould be a better name.)I didn’t know about
serve --help, I always resorted to the README/website 😆Edit: there’s another mistake,
--hostdescribes as “defaults to listening on all interfaces” but actually by default it only listens to loopback (localhost).