-
Notifications
You must be signed in to change notification settings - Fork 202
Closed
Labels
Description
Currently, we are creating a new WS entry to do server-client communication:
devtools/packages/devtools/src/module-main.ts
Lines 58 to 59 in 703b69a
| server.middlewares.use(ROUTE_ENTRY, tinyws() as any) | |
| server.middlewares.use(ROUTE_ENTRY, rpcMiddleware as any) |
Since Nuxt DevTools is relying on Vite (I see in the near future, we probably only support Vite), I guess reusing Vite's WS would make things more efficient and stable. As Vite has the capability of handling custom events now: vitejs/vite#7437
This could potentially solve the connection issue in back-proxy or dockers, as Vite handles them well. Also could align with the approaches of vite-plugin-inspect etc.
/cc @pi0 you mentioned previously about reusing WS from Nitro, do you think it's still a thing, and what's your opinion on choosing which over which?
Reactions are currently unavailable