chore: migrate RPC to Vite DevTools Kit's RPC layer#957
Draft
Conversation
Replace direct birpc usage with @vitejs/devtools-kit's RpcFunctionsHost for unified RPC transport. Maintain backward compatibility for existing Nuxt modules using extendServerRpc() through compatibility proxies. - Move server RPC registration into Vite DevTools plugin setup callback - Use RpcFunctionsHost.register() instead of createBirpcGroup - Replace client-side birpc+HMR with getDevToolsRpcClient() from devtools-kit - Add compatibility broadcast/functions proxies for seamless module integration - Remove unused WS_EVENT_NAME constant and direct birpc dependencies Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Deploying nuxt-devtools with
|
| Latest commit: |
d435ec7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://77b31992.nuxt-devtools.pages.dev |
| Branch Preview URL: | https://antfu-migrate-rpc-vite-devto.nuxt-devtools.pages.dev |
…vTools - Queue RPC broadcasts before host connects instead of dropping them - Remove Nuxt DevTools auth system (now handled by Vite DevTools) - Keep auth APIs as deprecated noops with runtime warnings for backward compat - Fix RPC return types to use AsyncServerFunctions for correct type inference Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| functions: ServerFunctions, | ||
| nuxt = useNuxt(), | ||
| ): BirpcGroup<ClientFunctions, ServerFunctions> { | ||
| ): { broadcast: ClientFunctions } { |
Member
There was a problem hiding this comment.
wouldn't that be a breaking change ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
🤖 Generated with Claude Code