Summary
On Vite 8, litestar-vite-plugin emits this deprecation warning during build / dev start:
`server.hmr.protocol/host/port/path/clientPort/timeout/server` is deprecated. Use `server.ws.*` instead.
Note that this option may be set by a plugin.
It fires even when the project's vite.config does not set server.hmr at all — the plugin injects it.
Environment
litestar-vite-plugin 0.24.1
vite 8.1.0
Source
The plugin injects the deprecated HMR network sub-options under server.hmr in dist/js/index.js:
- the
config hook sets server.hmr = { path: "vite-hmr", clientPort?, ... } (~L145–149)
- later
hmr: { host } / hmr: { host: resolvedHost } (~L847, ~L880)
In Vite 8 the HMR network options (host, protocol, port, path, clientPort, timeout) moved from server.hmr.* to server.ws.*. server.hmr should now carry only non-network toggles (e.g. overlay, or false to disable).
Suggested fix
Emit the network options under server.ws.* instead of server.hmr.*, keeping server.hmr only for the enable/disable toggle. May need to gate on Vite major version for back-compat with Vite 5–7.
Repro
Any litestar-vite project on Vite 8 → vite build (or dev server start) prints the warning.
Summary
On Vite 8,
litestar-vite-pluginemits this deprecation warning during build / dev start:It fires even when the project's
vite.configdoes not setserver.hmrat all — the plugin injects it.Environment
litestar-vite-plugin0.24.1vite8.1.0Source
The plugin injects the deprecated HMR network sub-options under
server.hmrindist/js/index.js:confighook setsserver.hmr = { path: "vite-hmr", clientPort?, ... }(~L145–149)hmr: { host }/hmr: { host: resolvedHost }(~L847, ~L880)In Vite 8 the HMR network options (
host,protocol,port,path,clientPort,timeout) moved fromserver.hmr.*toserver.ws.*.server.hmrshould now carry only non-network toggles (e.g.overlay, orfalseto disable).Suggested fix
Emit the network options under
server.ws.*instead ofserver.hmr.*, keepingserver.hmronly for the enable/disable toggle. May need to gate on Vite major version for back-compat with Vite 5–7.Repro
Any litestar-vite project on Vite 8 →
vite build(or dev server start) prints the warning.