-
-
Couldn't load subscription status.
- Fork 191
Update React Router RSC example to match official template structure #631
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]>
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.
No. Only update reactr-outer-vite/entry.{browser,rsc,ssr} to be rewritten similar to src/entry.{browser,rsc,ssr}.
Co-authored-by: hi-ogawa <[email protected]>
Updated as requested. I reverted the complete restructure and only updated the entry files in |
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.
remove packagelock.json. use pnpm instead of npm
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.
Removed package-lock.json and updated README to use pnpm commands instead of npm. The repository already uses pnpm workspace configuration, so this aligns the example with the rest of the project. Changes in commit 0110ead.
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.
don't change packages/plugin-rsc/examples/react-router/README.md.
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.
Reverted README.md to preserve the original npm commands as requested. Changes in commit 278bac1.
Co-authored-by: hi-ogawa <[email protected]>
Co-authored-by: hi-ogawa <[email protected]>
|
Closing in favor of #632 |
This PR updates the React Router RSC example in
packages/plugin-rsc/examples/react-routerto match the official template structure from@remix-run/react-router-templates/unstable_rsc-vite.Key Changes
Dependencies Updated
0.0.0-experimental-23decd7bcto stable7.7.0@remix-run/node-fetch-server,express,compression,cross-envfor production server supportStructure Modernization
app/tosrc/directory structure following React Router conventionssrc/entry.browser.tsx,src/entry.rsc.tsx,src/entry.ssr.tsx)app/routes/tosrc/routes/with lazy loading configurationreact-router-viteplugin with official@vitejs/plugin-rsc/pluginConfiguration Updates
server.jswith Express setup for production deploymentSimplified Example
What This Fixes
The previous example used experimental React Router versions and a custom plugin structure that diverged from React Router's official recommendations. This update:
Testing
- ✅ Development server runs successfully (
- ✅ Production build completes without errors (
- ✅ Production server starts and serves content (
- ✅ Client-side navigation works between routes
- ✅ React Server Components render correctly
- ✅ CloudFlare deployment configurations remain functional
npm run dev)npm run build)npm start)The example now provides a clean, modern starting point for developers wanting to use React Server Components with React Router and Vite, following the same patterns as the official React Router team's template.
💡 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.