-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next major release: Make this a proper esm module #72
Comments
Kind of related (or maybe add another issue/ simple pull request?), when I build my app for production, it is throwing an error trying to import
because it is not listed in the Ah I nvm, I read on Gitter, that it is recommended to basically clone the repository to implement your own custom y-websocket server right? |
Is it possible to upgrade the package.json to use |
This issue makes yjs impossible to use with the latest Svelte/SvelteKit apart from very hard and hacky workarounds. Edit: To add more info to TeemuKoivisto's post above, I hacked the package.json to use |
@nokola I'll make a PR and see what's the reception. And my current solution has been just pinning the y-websocket version to |
Any updates to this? I'm forced to use an ugly shim because Stop-gap for those who ended up here: Create a shim with the exports.Y = require('yjs'); … and then import is as normal: import { Y } from './yjs-shim.cjs'; |
Hi, it would be great if this were released soon. |
Is this stil not updated? What's blocking? I'm also in the situation of having to integrate Y.js to sveltekit. |
I'm using yjs with sveltekit/svelte 5 without problem. Using esm. |
Note to myself:
Make this a proper ESM module by setting
type: "module"
in package.json. Currently, thebin
folder contains commonjs modules (with file ending of.js
) and thesrc
folder contains ecmascript modules (also with the file ending.js
). This is invalid to the spec.But to keep compatibility, we have to keep the current format until the next major release because some projects require the
bin
module using an absolute path.The text was updated successfully, but these errors were encountered: