Skip to content

fix: debounce fs route hmr events, avoid reload for existing routes#2174

Open
katywings wants to merge 3 commits into
mainfrom
fix-fs-route-hmr
Open

fix: debounce fs route hmr events, avoid reload for existing routes#2174
katywings wants to merge 3 commits into
mainfrom
fix-fs-route-hmr

Conversation

@katywings

@katywings katywings commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What is the current behavior?

  • When starting the server, multiple reloads and invalidations are triggered per added route
  • When renaming routes, multiple reloads and invalidations are triggered (file rename = "remove file + add file")
  • When just changing an existing route, it still triggers a full client reload
Screencast_20260704_131753.mp4

What is the new behavior?

  • Reloads and invalidations are debounced
  • Changing an existing valid route triggers a soft HMR, no client reload
  • Adding a default export to an existing invalid route file, adds the route and reloads the client
  • Removing a default export from an existing valid route file, removes the route and reloads the client
Screencast_20260704_131925.mp4

Other information

From what I can tell the route HMR has been broken atleast since #2125. I tried to make sure that I didn't introduce a regression. The routes graph is still updated when adding new files.

@changeset-bot

changeset-bot Bot commented Jul 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3f28b00

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Jul 4, 2026

Copy link
Copy Markdown

Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit 3f28b00
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6a4bc093df11a20008891e4a
😎 Deploy Preview https://deploy-preview-2174--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Jul 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/start@2174
npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/vite-plugin-nitro-2@2174

commit: 3f28b00

@katywings katywings marked this pull request as ready for review July 4, 2026 16:57
@katywings katywings changed the title WIP: fix: debounce fs route hmr events, avoid reload for existing routes fix: debounce fs route hmr events, avoid reload for existing routes Jul 4, 2026
Comment thread packages/start/src/config/fs-routes/fs-watcher.ts Outdated
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