Skip to content

Commit 33346b3

Browse files
author
aligneddev
committed
hmr comment
1 parent 3e267c4 commit 33346b3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/BikeTracking.AppHost/AppHost.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
endpoint.Port = 5173;
2323
endpoint.TargetPort = 5173;
2424
// Disabling the proxy means Aspire's dashboard will not track requests for the frontend application, and you must ensure the configured port (default 5173) does not conflict with other local Vite instances
25+
// After restart, the Aspire dashboard will show the frontend link pointing directly to http://localhost:5173 (no proxy). At that URL, the browser connects straight to the Vite dev server and the HMR WebSocket (ws://localhost:5173) will work correctly.
26+
27+
// Why it won't work at the proxy port at all: Aspire's DCP proxy handles HTTP but does not upgrade connections to WebSockets, so the ws:// HMR handshake is silently dropped regardless of what HMR options you set on the Vite side.
2528
// Required for HMR to work with default Aspire proxy
2629
endpoint.IsProxied = false;
2730
}

0 commit comments

Comments
 (0)