Skip to content

test(plugin-rsc): add ReadableStream polyfill for WebKit/Safari support#1076

Closed
hi-ogawa wants to merge 3 commits intomainfrom
fix/plugin-rsc-webkit-polyfill
Closed

test(plugin-rsc): add ReadableStream polyfill for WebKit/Safari support#1076
hi-ogawa wants to merge 3 commits intomainfrom
fix/plugin-rsc-webkit-polyfill

Conversation

@hi-ogawa
Copy link
Copy Markdown
Contributor

Summary

Test plan

  • Run e2e tests with webkit: pnpm exec playwright test e2e/browser.test.ts e2e/browser-mode.test.ts --project=webkit

🤖 Generated with Claude Code

Safari doesn't implement ReadableByteStreamController, which causes browser-only
RSC examples to fail. This adds web-streams-polyfill to conditionally polyfill
ReadableStream when needed, enabling WebKit e2e tests.

Based on https://github.com/gaearon/rscexplorer/blob/main/src/shared/polyfill.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@hi-ogawa hi-ogawa changed the title fix(plugin-rsc): add ReadableStream polyfill for WebKit/Safari support test(plugin-rsc): add ReadableStream polyfill for WebKit/Safari support Jan 20, 2026
hi-ogawa and others added 2 commits January 20, 2026 12:22
Add console logging to tests to help debug WebKit issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The polyfill needs to be imported before @vitejs/plugin-rsc/browser
and entry.rsc so the dynamic import of web-streams-polyfill starts
before react-server-dom-webpack is evaluated.

Also reverts the unnecessary ReadableByteStreamController polyfill -
only ReadableStream needs to be polyfilled (like rscexplorer does).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@hi-ogawa hi-ogawa closed this Jan 20, 2026
@hi-ogawa hi-ogawa deleted the fix/plugin-rsc-webkit-polyfill branch January 20, 2026 09:23
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