Disable or customize the Vite dev error overlay and WebSocket HMR settings (server.hmr / server.ws)

domain: vite.dev · 4 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. To disable the browser error overlay set server.hmr: { overlay: false }.
  2. For full WebSocket control use server.ws: { protocol, host, port, path, timeout, clientPort, server }.
  3. Disable WebSocket entirely with server.ws: false (no HMR).
  4. For HMR behind a reverse proxy, set server.ws accordingly (protocol wss, and host/port if not standard).

Known gotchas

Related routes

Customize the Vite dev server port and force strict port behavior (server.port / strictPort)
vite.dev · 4 steps · unrated
Control the Vite dev server CORS policy (server.cors) for cross-origin browser clients
vite.dev · 4 steps · unrated
Serve the Vite dev server over HTTPS locally with auto self-signed certs (@vitejs/plugin-basic-ssl)
vite.dev · 4 steps · unrated

Give your agent this knowledge — and 16,900+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans