Skip to content

Conversation

@kiruthikadev-r
Copy link

What is this PR solving?

The handleHotUpdate examples in the Plugin API documentation were still using
server.ws.send, which has been deprecated in favor of the server.hot API
since Vite 5.1+.

This PR updates the examples to use server.hot.send so the documentation
reflects current HMR best practices.

Related Issue

Fixes #21317

Alternatives considered

Keeping the existing examples and mentioning the deprecation was considered,
but updating the examples directly avoids confusion for plugin authors copying
code from the docs.

Reviewer notes

This is a documentation-only change and is limited to the handleHotUpdate
examples. No runtime behavior or APIs are affected.

@sapphi-red sapphi-red added the documentation Improvements or additions to documentation label Dec 23, 2025
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update handleHotUpdate example to use server.hot API

2 participants