-
-
Notifications
You must be signed in to change notification settings - Fork 190
chore(rsc): example of rsc environment on browser module runner
#933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: hi-ogawa <[email protected]>
Co-authored-by: hi-ogawa <[email protected]>
Co-authored-by: hi-ogawa <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot getPluginApi should be unnecessary. focus on dev only first.
packages/plugin-rsc/examples/browser-mode2/src/framework/entry.browser.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: hi-ogawa <[email protected]>
Done in commit e8c5a89. Removed |
Co-authored-by: hi-ogawa <[email protected]>
Co-authored-by: hi-ogawa <[email protected]>
|
@copilot try again. |
Co-authored-by: hi-ogawa <[email protected]>
Added e2e test in commit 4f24bd6. The test follows the same structure as no-ssr and uses |
|
@copilot debug e2e failure |
Co-authored-by: hi-ogawa <[email protected]>
Identified the issue - the RSC environment is trying to import Node.js built-ins like Working on finding the right approach to polyfill or alias these Node.js modules for browser execution. |
rsc environment on browser module runner
react-serverconditioned environment with module runner on browser #932Copilot's imcomplete work
Current Status
The example now loads the HTML page correctly, but there's still an issue with Node.js built-in modules:
node:async_hookswhich doesn't exist in browsers##Need to resolve
The fundamental challenge is that React Server Components use Node.js APIs (
async_hooks,process, etc.) that aren't available in browsers. The RSC environment needs to be configured to work with browser-compatible versions of these APIs when loaded via module runner.Original prompt
Fixes #932
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.