Skip to content

feat(desktop): autodetect React Router framework#35557

Open
akazwz wants to merge 2 commits into
denoland:mainfrom
akazwz:desktop-react-router-detection
Open

feat(desktop): autodetect React Router framework#35557
akazwz wants to merge 2 commits into
denoland:mainfrom
akazwz:desktop-react-router-detection

Conversation

@akazwz

@akazwz akazwz commented Jun 27, 2026

Copy link
Copy Markdown

Summary

  • detect React Router framework mode via @react-router/dev before falling through to generic Vite detection
  • generate a static build/client entrypoint for React Router SPA mode (ssr: false) with an HTML fallback
  • generate an SSR entrypoint that serves build/client assets first, then routes requests through React Router's createRequestHandler
  • include React Router in the deno compile . and deno desktop . supported framework messages

Docs PR: denoland/docs#3361

Notes

React Router's default server entry uses Node's renderToPipeableStream; projects building with Deno need to provide a Web Streams-compatible app/entry.server.tsx using renderToReadableStream. The generated runtime entrypoint assumes the project has already built successfully with Deno.

Testing

  • cargo fmt --check
  • git diff --check
  • cargo test -p deno react_router --lib -- --nocapture (fails before running tests in this local checkout because clang rejects the configured -fuse-ld=lld linker flag)
  • deno task build in a React Router SPA sample
  • React Router SSR build in a temp sample with a Web Streams-compatible app/entry.server.tsx, plus manual handler/static-asset smoke checks

@deno-cla-assistant

deno-cla-assistant Bot commented Jun 27, 2026

Copy link
Copy Markdown

Deno Individual Contributor License Agreement

All contributors have signed the CLA. Thank you!

Re-run CLA check


This is an automated message from CLA Assistant

@akazwz akazwz force-pushed the desktop-react-router-detection branch from 8ee4f35 to 9162d2b Compare June 27, 2026 05:14
@akazwz akazwz changed the title feat: support React Router framework detection feat(desktop): autodetect React Router framework Jun 27, 2026
@bartlomieju bartlomieju requested a review from crowlKats June 27, 2026 09:51
@crowlKats

Copy link
Copy Markdown
Member

@akazwz thanks for the PR; could you get CI to pass?

@akazwz

akazwz commented Jun 29, 2026

Copy link
Copy Markdown
Author

Thanks for the heads up! I updated the framework detection golden output, and CI is green now.

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.

2 participants