Repository navigation
feat(desktop): enable --hmr for Vite and Nuxt - #35851
Merged
Merged
Conversation
`deno desktop --hmr` already spawns the detected framework's dev server, parses its `Local:` URL and hands it to the desktop runtime, but Vite and the Nitro-based frameworks (Nuxt, SolidStart, TanStack Start) left `hmr_command` unset, so a Vue app (plain Vite SPA or Nuxt) couldn't use it and still required a `vite build` + `deno desktop` on every change. Wire `hmr_command` to `deno task dev` for `detect_vite` (both SSR and SPA/MPA branches) and `detect_nitro_framework`. All of these run a Vite/vinxi dev server that prints the `Local: http://β¦` line `parse_dev_server_url` scans for, so no changes to the HMR launcher are needed. Towards denoland#35745. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nathanwhit
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
deno desktop --hmr(added in #35722) already spawns the detected framework's dev server, parses itsLocal:URL, and hands it to the desktop runtime. But that PR only wiredhmr_commandfor Fresh, SvelteKit, and React Router β Vite and the Nitro-based frameworks (Nuxt, SolidStart, TanStack Start) were left ashmr_command: None // TODO.As a result a Vue app (a plain Vite SPA, or Nuxt) could not use
--hmrand still required avite build+deno desktopon every change β the workflow gap reported in #35745.Change
Wire
hmr_commandtodeno task devfor:detect_viteβ both the SSR (server.{js,ts,mjs}) and SPA/MPA branches. Covers a Vue+Vite SPA (npm create vue@latest).detect_nitro_frameworkβ shared by Nuxt, SolidStart, and TanStack Start.These all run a Vite/vinxi-based dev server that prints the
Local: http://β¦lineparse_dev_server_urlalready scans for, so no changes to the HMR launcher (desktop.rs) are needed.Tests
vue_vite_spa_supports_hmr(mimics anpm create vueproject).hmr_commandresolves todeno task dev.Fixes #35745.