From 3269b36bd0b816646a4fbc1323727ce8b6905068 Mon Sep 17 00:00:00 2001 From: Sonia Appasamy Date: Mon, 6 Nov 2023 16:10:32 -0500 Subject: [PATCH] client/web: fix hotreload proxy Previously had HMR websocket set to run from a different port than the http proxy server. This was an old setting carried over from the corp repo admin panel config. It's messing with hot reloads when run from the tailscaled web client, as it keeps causing the full page to refresh each time a connection is made. Switching back to the default config here fixes things. Updates tailscale/corp#14335 Signed-off-by: Sonia Appasamy --- client/web/vite.config.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/client/web/vite.config.ts b/client/web/vite.config.ts index 98873bc72..f341ce55e 100644 --- a/client/web/vite.config.ts +++ b/client/web/vite.config.ts @@ -47,14 +47,8 @@ export default defineConfig({ // This needs to be 127.0.0.1 instead of localhost, because of how our // Go proxy connects to it. host: "127.0.0.1", - // If you change the port, be sure to update the proxy in adminhttp.go too. + // If you change the port, be sure to update the proxy in assets.go too. port: 4000, - // Don't proxy the WebSocket connection used for live reloading by running - // it on a separate port. - hmr: { - protocol: "ws", - port: 4001, - }, }, test: { exclude: ["**/node_modules/**", "**/dist/**"],