Skip to content

feat(desktop): enable --hmr for React Router - #35900

Merged
bartlomieju merged 2 commits into
denoland:mainfrom
akazwz:feat/react-router-desktop-hmr
Jul 20, 2026
Merged

bartlomieju merged 2 commits into
denoland:mainfrom
akazwz:feat/react-router-desktop-hmr

Conversation

@akazwz

@akazwz akazwz commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

deno desktop --hmr already supports running a detected framework dev server and using its Local: URL for desktop HMR.

React Router framework projects were detected correctly, but both the SPA and SSR branches left hmr_command unset. As a result, deno desktop --hmr . did not start the React Router dev server and could not use React Router's Vite-powered HMR flow.

Change

Wire React Router's hmr_command to deno task dev for:

  • SPA mode (ssr: false)
  • SSR mode

This matches the existing Vite-based framework HMR path.

Tests

  • Extended the React Router SPA detection test to assert hmr_command is deno task dev
  • Extended the React Router SSR detection test to assert hmr_command is deno task dev
cargo test -p deno --lib react_router

@bartlomieju bartlomieju left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bartlomieju
bartlomieju merged commit 57e67f1 into denoland:main Jul 20, 2026
136 checks passed
@akazwz
akazwz deleted the feat/react-router-desktop-hmr branch July 20, 2026 10:28
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.

3 participants