Library issue: yJs synchronisation and client (state) being overwritten

I’ve since added a peer view and found a suitable iceServer / TURN configuration working for cellular connections (at least, in the EU). If anyone still is running into issues, let me know.

@dleeftink My original suggestion contained

const peers = () => provider.room.webrtcConns.size

simply as a shorthand getter. There is no point in declaring it async, and you can just reference the map directly:

const peers = provider.room.webrtcConns;

Woops this was added pre custom server config to listen to ydoc changes but forgot to take it out. Thanks for all suggestions and reviewing:)

There is a much easier way to resolve the conflict, using esm.sh:

Y = import('https://esm.sh/yjs@13.5.41')
WebrtcProvider = (await import('https://esm.sh/y-webrtc@10.2.3?deps=yjs@13.5.41')).WebrtcProvider