Patch Changes
-
#8231
51a2fd3
Thanks @petebacondarwin! - fix: use ESM WebSocketServer import to avoid crashing vite devIt appears that if there are multiple versions of the
ws
package in a user's project
then the Node.js resolution picks up the ESM "import" package export rather than the "require" package export.
This results in the entry-point having different JS exports:
In particular the default export no longer contains aServer
property; instead one must import theWebSocketServer
named JS export.
While it is not clear why the Node.js behaviour changes in this way, the cleanest fix is to import theWebSocketServer
directly.