I'm developing a VS Code extension that loads Yjs inside a WebView.
VS Code WebViews cannot import ES modules due to CSP restrictions, so I cannot use:
import * as Y from "https://esm.run/yjs"
I need the UMD/IIFE browser bundle (yjs.js) that exposes:
window.Y
However, the latest Yjs releases (e.g., yjs-14.0.0-13) only contain ESM source files in /src and do not include any browser bundle such as:
dist/yjs.js
dist/yjs.umd.js
dist/yjs.iife.js
CDN links that used to work also return 404:
https://cdn.jsdelivr.net/npm/yjs/dist/yjs.js
https://unpkg.com/yjs/dist/yjs.js
Because VS Code WebView requires a local bundle, Yjs fails to load:
ERROR: Yjs (Y) is not defined
Question:
Does Yjs still publish a browser UMD bundle anywhere? If so, where is the official link?
If not, how do I correctly build
yjs.jsmanually from the source repo using Rollup?What is the recommended way to use Yjs in VS Code Webviews now that ESM imports are blocked?