Skip to content
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

chore: port vercel/app-playground #3

Merged
merged 26 commits into from
May 31, 2024
Merged

chore: port vercel/app-playground #3

merged 26 commits into from
May 31, 2024

Conversation

hi-ogawa
Copy link
Owner

@hi-ogawa hi-ogawa commented May 30, 2024

Porting https://github.com/vercel/app-playground to @hiogawa/react-server

https://rsc-on-vite-vercel-app-playground.vercel.app

For now, copying only /layouts part. We can follow up other features later depending on priorities.

differences

  • tsconfig paths -> package.json imports subpath or plugin
  • set package "type": "module" for top level cjs configs (e.g. postcss.config.js -> postcss.config.cjs)
  • next/link Link -> @hiogawa/react-server/client Link
  • usePathname, useSearchParams -> @hiogawa/react-server/client useRouter
  • notFound -> createError({ status: 404 })
  • not-found.tsx -> error.tsx can be used to handle all errors

unsupported

  • metadata
  • template.tsx
  • useSelectedLayoutSegment

todo

  • compare perf
    • start up time?
    • build time?
    • hmr time
  • deploy

@hi-ogawa hi-ogawa changed the title chore: port vercel/app-playground chore: port vercel/app-playground May 31, 2024
@hi-ogawa hi-ogawa merged commit 1e75c7e into main May 31, 2024
1 check passed
@hi-ogawa hi-ogawa deleted the chore-app-playground branch May 31, 2024 02:16
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