Update React Router RSC example to match official template structure#631
Update React Router RSC example to match official template structure#631Copilot wants to merge 5 commits into
Conversation
Co-authored-by: hi-ogawa <4232207+hi-ogawa@users.noreply.github.com>
hi-ogawa
left a comment
There was a problem hiding this comment.
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 <4232207+hi-ogawa@users.noreply.github.com>
Updated as requested. I reverted the complete restructure and only updated the entry files in |
There was a problem hiding this comment.
remove packagelock.json. use pnpm instead of npm
There was a problem hiding this comment.
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.
don't change packages/plugin-rsc/examples/react-router/README.md.
There was a problem hiding this comment.
Reverted README.md to preserve the original npm commands as requested. Changes in commit 278bac1.
Co-authored-by: hi-ogawa <4232207+hi-ogawa@users.noreply.github.com>
Co-authored-by: hi-ogawa <4232207+hi-ogawa@users.noreply.github.com>
|
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.