@@ -251,8 +251,7 @@ export const reactRouterDevTools: (args?: ReactRouterViteConfig) => Plugin[] = (
251251 process . rdt_port = server . config . server . port ?? 5173
252252 port = process . rdt_port
253253 } )
254- //@ts -ignore - vite 5/6 compat
255- const channel = server . hot . channels . find ( ( channel ) => channel . name === "ws" ) ?? server . environments ?. client . hot
254+ const channel = server . hot
256255 const editor = args ?. editor ?? DEFAULT_EDITOR_CONFIG
257256 const openInEditor = async ( path : string | undefined , lineNum : string | undefined ) => {
258257 if ( ! path ) {
@@ -268,9 +267,7 @@ export const reactRouterDevTools: (args?: ReactRouterViteConfig) => Plugin[] = (
268267 }
269268 if ( routine === "request-event" ) {
270269 unusedEvents . set ( parsedData . id + parsedData . startTime , parsedData )
271- for ( const client of server . hot . channels ) {
272- client . send ( "request-event" , JSON . stringify ( parsedData ) )
273- }
270+ server . hot . send ( "request-event" , JSON . stringify ( parsedData ) )
274271
275272 return
276273 }
@@ -291,9 +288,7 @@ export const reactRouterDevTools: (args?: ReactRouterViteConfig) => Plugin[] = (
291288 routeInfo . set ( id , { loader : [ ] , action : [ data ] } )
292289 }
293290 }
294- for ( const client of server . hot . channels ) {
295- client . send ( "route-info" , JSON . stringify ( { type, data } ) )
296- }
291+ server . hot . send ( "route-info" , JSON . stringify ( { type, data } ) )
297292 } )
298293 )
299294
0 commit comments