Skip to content

Add React DOM edge server aliases#8

Draft
southpolesteve wants to merge 1 commit intoTanStack:mainfrom
southpolesteve:codex/redact-edge-aliases
Draft

Add React DOM edge server aliases#8
southpolesteve wants to merge 1 commit intoTanStack:mainfrom
southpolesteve:codex/redact-edge-aliases

Conversation

@southpolesteve
Copy link
Copy Markdown
Collaborator

Summary

  • Alias react-dom/server.edge and react-dom/static.edge to @tanstack/redact/server in the Redact Vite plugin.
  • Add a focused plugin test that resolves both edge entrypoints through a local package root.

Why

vinext App Router builds run through Vite RSC and edge-oriented SSR entrypoints. Those generated bundles can import React DOM through react-dom/server.edge and react-dom/static.edge, while Redact previously only claimed react-dom/server. When swapping vinext client/SSR environments to Redact, these edge imports need to resolve to the same Redact server implementation instead of escaping to React DOM or failing resolution.

This keeps Redact's RSC rule intact: the plugin still skips the rsc environment so React Flight serialization continues to use real React internals, while client and SSR environments can use Redact.

Validation

  • pnpm --filter tests test -- vite-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant