Closed TeemuKoivisto closed 2 years ago
Thank you for this @TeemuKoivisto!
My plan was to transform the server to a proper ESM module. I did so in https://github.com/yjs/y-websocket/pull/89
I will close this PR because I believe that transforming that ESM is the way to go in the future. We can still keep compatibility to cjs if needed.
Awesome! That's even better 🙂
Hey so this is a PR to fix the problems as described here https://github.com/yjs/y-websocket/issues/72 Basically as of now, the ESM module import in
"exports"
is invalid according to the spec. Which some bundlers import despite of it, SvelteKit is perhaps the strictest on this which makes importing the library impossible without modifications (or reverting to an older version).So I changed the
"type"
back to module as it was at some point and updated the CJS files to.cjs
which ought to keep things working in downstream repos as it was before. I think this works now ok but let me know @dmonadHuly®: YJS-764