Skip to content
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

Set type to ESM module, update CommonJS .js files to .cjs #88

Closed
wants to merge 1 commit into from

Conversation

TeemuKoivisto
Copy link

@TeemuKoivisto TeemuKoivisto commented Nov 30, 2021

Hey so this is a PR to fix the problems as described here #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 @dmonad

Huly®: YJS-764

@dmonad
Copy link
Member

dmonad commented Nov 30, 2021

Thank you for this @TeemuKoivisto!

My plan was to transform the server to a proper ESM module. I did so in #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.

@dmonad dmonad closed this Nov 30, 2021
@TeemuKoivisto
Copy link
Author

Awesome! That's even better 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants