y-websocket icon indicating copy to clipboard operation
y-websocket copied to clipboard

Fixing errors with CommonJS import of `ws`

Open kellydunn opened this issue 3 years ago • 0 comments

Hello there!

When attempting to get a Hello World of y-websocket working as a client running node v17.8.0, I encountered a few errors regarding missing imports for ws in src/y-websocket.js. This PR includes the following to get a fully functioning Hello World moving from the client's perspective:

  • Importing WebSocket explicitly from ws
  • Updating the package.json to explicitly call out this as an ES module (similar PRs: #104)
  • Updating README.md for updated boilerplate

kellydunn avatar Jun 08 '22 02:06 kellydunn