Skip to content

fix(dev-server): use public ssrModule getter in handleHotUpdate - #353

Merged
yusukebe merged 1 commit into
honojs:mainfrom
yuintei:fix/ssr-module-getter
Apr 20, 2026
Merged

yusukebe merged 1 commit into
honojs:mainfrom
yuintei:fix/ssr-module-getter

Conversation

@yuintei

@yuintei yuintei commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

I noticed (ssr) page reload never appears when editing SSR modules, so there's no way to tell from the terminal if SSR reload is working. The page does reload, but only because Vite's HMR bubbles up as a fallback, not through the intended explicit full-reload path.

The cause is handleHotUpdate (#233 / #235) checking mod._ssrModule, a private internal field on Vite's compat ModuleNode. This replaces it with mod.ssrModule, the public getter that works across Vite 5 through 8. No compatibility concerns. Confirmed client modules are unaffected.

@changeset-bot

changeset-bot Bot commented Apr 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b71f0ea

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

This PR includes changesets to release 1 package
Name Type
@hono/vite-dev-server 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

@yusukebe yusukebe 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.

LGTM!

@yusukebe

Copy link
Copy Markdown
Member

@yuintei

Thank you! I'll merge and release a new version.

@yusukebe
yusukebe merged commit 81c9cbe into honojs:main Apr 20, 2026
4 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 20, 2026
@yuintei
yuintei deleted the fix/ssr-module-getter branch April 20, 2026 13:01
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