Skip to content

fix: update routes graph when new file is created#2125

Merged
atilafassina merged 4 commits into
mainfrom
innovative-potential
Apr 3, 2026
Merged

fix: update routes graph when new file is created#2125
atilafassina merged 4 commits into
mainfrom
innovative-potential

Conversation

@atilafassina

Copy link
Copy Markdown
Member

When in devserver, hot-reload would not catch newly created routes. Existing routes would work fine because Vite would handle the client-side HMR. But on new routes, we need to reload the devserver for ssr

Problem: FS Watcher used server.environments.server but the SSR environment is named ssr

  • Changes from server.environments.server => server.environments.ssr (actual fix)
  • replaced deprecated server.moduleGraph (Vite 5 API) with server.environments.client.moduleGraph

@changeset-bot

changeset-bot Bot commented Apr 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01b5505

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

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 Apr 3, 2026

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit 01b5505
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/69d0186f9f95a100086ef434
😎 Deploy Preview https://deploy-preview-2125--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@pkg-pr-new

pkg-pr-new Bot commented Apr 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 01b5505

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes dev-server route hot-reload behavior so newly created filesystem routes trigger the correct Vite environment/module graph invalidation (SSR environment is ssr, not server).

Changes:

  • Switch route reload invalidation to use server.environments.ssr (via VITE_ENVIRONMENTS.server) for SSR.
  • Replace deprecated server.moduleGraph usage with server.environments.client.moduleGraph.
  • Send a full-reload message via the selected environment hot channel after invalidation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/start/src/config/fs-routes/fs-watcher.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/start/src/config/fs-routes/fs-watcher.ts
Comment thread .changeset/purple-taxes-join.md
@atilafassina atilafassina merged commit abe3979 into main Apr 3, 2026
10 checks passed
@atilafassina atilafassina deleted the innovative-potential branch April 3, 2026 19:45
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