You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which results in issue when people are using custom forwarding with specific port or doing other similar stuff.
We would like to have property at config where is "hmr" for client located.
eg.:
hmr: {hostname: "localhost"}
In our case we are using vite as Library and vite should be restricted to localhost only. Where location.hostname is the forwarded url which has no the hmr port enabled.
Describe the solution you'd like
Vite should support custom url for hmr or be more connected to hostname property at ServerConfig.
Additional context
WSL have many issues around port-forwarding. So the root of the page is running on whatever:port and vite is located at localhost:port. When whatever:port is visited then vite's hmr is trying to open whatever:hmrport, even when vite-hmr + client-code are loaded from localhost:port.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The vite is using
location.hostname
to resolve location of the page:vite/src/client/client.ts
Line 35 in a47429d
Which results in issue when people are using custom forwarding with specific port or doing other similar stuff.
We would like to have
property
at config where is "hmr" for client located.eg.:
In our case we are using vite as Library and vite should be restricted to
localhost
only. Wherelocation.hostname
is the forwarded url which has no the hmr port enabled.Describe the solution you'd like
Vite should support custom url for hmr or be more connected to
hostname
property at ServerConfig.Additional context
WSL have many issues around port-forwarding. So the root of the page is running on
whatever:port
and vite is located atlocalhost:port
. When whatever:port is visited then vite's hmr is trying to open whatever:hmrport, even when vite-hmr + client-code are loaded from localhost:port.The text was updated successfully, but these errors were encountered: