feat(rsc): ability to register server function via plugins#1310
Merged
Conversation
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
hi-ogawa
marked this pull request as draft
July 24, 2026 03:35
hi-ogawa
commented
Jul 24, 2026
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
hi-ogawa
commented
Jul 24, 2026
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
hi-ogawa
commented
Jul 24, 2026
Co-authored-by: OpenCode <noreply@opencode.ai>
hi-ogawa
commented
Jul 24, 2026
hi-ogawa
commented
Jul 24, 2026
Comment on lines
+44
to
+45
| ServerReferencesManager, | ||
| type ServerReferenceMeta, |
Contributor
Author
There was a problem hiding this comment.
export type from top-level?
Contributor
Author
There was a problem hiding this comment.
probably fine for later.
hi-ogawa
commented
Jul 24, 2026
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
hi-ogawa
commented
Jul 24, 2026
hi-ogawa
commented
Jul 24, 2026
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
hi-ogawa
marked this pull request as ready for review
July 24, 2026 07:58
Co-authored-by: OpenCode <noreply@opencode.ai>
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.
Previously our builtin server function support owned
manager.serverReferenceMetaMaplifecycle entirely i.e. onlyuse serverdirective can participate in server function logic. This change is aimed to extend theserverReferenceMetaMapsingleton concept so that user land plugins can manage server reference independently through own transform. The implementation is inspired by how Vinext keeps track of server references cloudflare/vinext#2156 with sandwitched plugins.See
packages/plugin-rsc/examples/custom-server-function/custom-server-function-plugin.tsfor custom server function plugin example.As explained in the design document above, this is independent from #1246 which is for improving standalone transform utilities and not about rsc plugin's builtin server references registration mechanism.
TODO