Make the HMR WebSocket URL follow the page URL - #1218
Merged
Merged
Conversation
|
Deployment previews on netlify for branch
|
addshore
force-pushed
the
fix/hmr-host-detection
branch
from
September 25, 2026 22:11
4212017 to
3171658
Compare
outdooracorn
approved these changes
Sep 27, 2026
outdooracorn
left a comment
Member
There was a problem hiding this comment.
Thanks for looking into this and submitting a PR! This works for me locally.
One clarification: this setting controls the WebSocket URL used by the browser's HMR client; it does not bind the Vue dev server to 0.0.0.0. The server's bind address is controlled by --host / devServer.host, and remains set by --host ui in docker-compose.yml.
I've added a comment to the devServer.client.webSocketURL setting and updated the PR title and description to reflect this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configure
devServer.client.webSocketURLas the specialauto://0.0.0.0:0/wsURL to make the HMR client derive the protocol, hostname, and port from the page loaded by the browser.This makes host-browser development connect to
ws://localhost:8081/ws, while containerized browser tests (e.g. Selenium) continue to reachhttp://ui:8081.Similar to #1207, this fixes the local HMR issue, but without causing CI to fail.
Validated locally:
ws://localhost:8081/ws.http://ui:8081.