-
Notifications
You must be signed in to change notification settings - Fork 802
Open
Labels
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersAn area label is needed to ensure this gets routed to the appropriate area owners
Description
Is your feature request related to a problem?
When using AddViteApp with the default Aspire proxy enabled, Vite's Hot Module Replacement (HMR) websocket connection fails. The workaround is:
.WithEndpoint("http", endpoint =>
{
endpoint.Port = 5173;
endpoint.IsProxied = false;
})This requires:
- Knowing that
IsProxied = falseexists - Hardcoding Vite's default port (fragile — conflicts if another Vite app is running)
- Losing Aspire's request tracking for the frontend
Describe the solution you'd like
Option A: AddViteApp should set IsProxied = false by default, since HMR doesn't work through the proxy.
Option B: The Aspire proxy should support websocket passthrough for HMR.
Additional context
Discovered in a project using AddViteApp + WithPnpm() with a React 19 + Vite frontend on Aspire 13.2.0-preview.1. The app loads fine but HMR silently fails — file edits don't hot-reload — until IsProxied = false is explicitly configured. This pattern is undocumented and was found through trial and error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersAn area label is needed to ensure this gets routed to the appropriate area owners