Vite plugin (v0.1.1) that enables running a Tauri application in a remote browser by proxying Tauri API calls through a leader WebView. The leader WebView runs on the development machine and forwards IPC commands to the actual Tauri backend. This plugin integrates with Vite's dev server to inject a WebSocket proxy, allowing remote browser clients to use `@tauri-apps/api` as if they were inside a Tauri window. Key differentiators: no need for physical Tauri runtime on the remote device, supports live reload and HMR, and works with Tauri v1 and v2. Requires Vite ^7.0.0 and a running Tauri dev server. Release cadence is experimental; breaking changes likely.
npm install vite-plugin-tauri-in-the-browserNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures Vite plugin to proxy Tauri API calls from a remote browser through a leader WebView; includes example invoke call.
Upgrade to Vite 7.x or stay on previous plugin version if using lower Vite.
Ensure Tauri dev server is bound to 0.0.0.0 or an accessible IP, not just localhost.
Pin version and monitor changelog before upgrading.
Verify Tauri API version compatibility; refer to Tauri migration guide.
Configure firewall to allow the wsPort; alternatively tunnel through SSH or VPN.
Test specific Tauri API calls; fallback to conditional code if running in browser vs Tauri.
Install as dev dependency: npm install -D vite-plugin-tauri-in-the-browser. Use ESM import only.
Ensure leaderUrl is a string starting with http:// or https://, or omit to use default.
Start the Tauri dev server first, then the Vite dev server. If using a non-default port, configure wsPort in plugin options.
Check that plugin is added in vite.config.ts and that the remote browser has WebSocket access to the leader.