Remote Connection Demo
This page is live. When you open it directly, it tells you how to connect. When you open it through a Vite DevTools dock registered with remote: true, it reads the connection descriptor from the URL and talks to your local dev server over WebSocket.
How it works
- Your plugin registers an iframe dock with
remote: truepointing at this page. - The DevTools core allocates a session-only auth token and appends the connection descriptor to the iframe URL:
#vite-devtools-kit-connection=… - When this page loads,
parseRemoteConnection()reads the descriptor, andconnectRemoteDevTools()opens a WebSocket back to the local dev server. - The live "dock registry" list above subscribes to the
devtoolskit:internal:docksshared state — it re-renders on every registration change.
See the Remote Client guide for the full API and the underlying security model.