@@ -93,12 +93,8 @@ import { ModuleGraph } from './mixedModuleGraph'
93
93
import type { ModuleNode } from './mixedModuleGraph'
94
94
import { notFoundMiddleware } from './middlewares/notFound'
95
95
import { buildErrorMessage , errorMiddleware } from './middlewares/error'
96
- import type { HmrOptions , HotBroadcaster } from './hmr'
97
- import {
98
- createDeprecatedHotBroadcaster ,
99
- handleHMRUpdate ,
100
- updateModules ,
101
- } from './hmr'
96
+ import type { HmrOptions , NormalizedHotChannel } from './hmr'
97
+ import { handleHMRUpdate , updateModules } from './hmr'
102
98
import { openBrowser as _openBrowser } from './openBrowser'
103
99
import type { TransformOptions , TransformResult } from './transformRequest'
104
100
import { transformRequest } from './transformRequest'
@@ -284,12 +280,10 @@ export interface ViteDevServer {
284
280
*/
285
281
ws : WebSocketServer
286
282
/**
287
- * HMR broadcaster that can be used to send custom HMR messages to the client
288
- *
289
- * Always sends a message to at least a WebSocket client. Any third party can
290
- * add a channel to the broadcaster to process messages
283
+ * An alias to `server.environments.client.hot`.
284
+ * If you want to interact with all environments, loop over `server.environments`.
291
285
*/
292
- hot : HotBroadcaster
286
+ hot : NormalizedHotChannel
293
287
/**
294
288
* Rollup plugin container that can run plugin hooks on a given file
295
289
*/
@@ -573,7 +567,7 @@ export async function _createServer(
573
567
httpServer,
574
568
watcher,
575
569
ws,
576
- hot : createDeprecatedHotBroadcaster ( ws ) ,
570
+ hot : ws ,
577
571
578
572
environments,
579
573
pluginContainer,
0 commit comments