From c2155e4bfefd24cc1f7be99d54e5e9d158f6b142 Mon Sep 17 00:00:00 2001 From: SirEdvin Date: Fri, 15 May 2026 16:42:01 +0000 Subject: [PATCH] fix(ui): make Vite HMR reliable on shared filesystems --- frontend/vite.config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 50e2056..0e4d44b 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -6,6 +6,12 @@ export default defineConfig({ plugins: [react(), tailwindcss()], server: { port: 5173, + watch: { + // Polling keeps HMR reliable on WSL, VM, and bind-mounted/shared filesystems + // where native file events can be dropped, causing updates only after refresh. + usePolling: true, + interval: 250, + }, proxy: { // /api/v1/ws/... is a WebSocket endpoint under the same /api prefix, // so we must enable ws here or the upgrade handshake dies at the proxy.