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

Usage with Skypack CDN? #339

Open
andersstorhaug opened this issue Jan 13, 2022 · 2 comments
Open

Usage with Skypack CDN? #339

andersstorhaug opened this issue Jan 13, 2022 · 2 comments

Comments

@andersstorhaug
Copy link

andersstorhaug commented Jan 13, 2022

I am attempting to use a package via Skypack that depends on IxJS.

This package understandably depends on the main ix package, but that doesn't work with Skypack because as far as I can tell, IxJS's package.json doesn't have any ESM properties.

If I try to use the ix package directly via Skypack with import { from } from "https://cdn.skypack.dev/ix/iterable"; this also doesn't work, because an ESM isn't exported. However, using import { from } from "https://cdn.skypack.dev/@reactivex/ix-es5-esm"; does work.

Wondering how this could be resolved -- should the library instead depend on @reactivex/ix-es5-esm / @reactivex/ix-esnext-esm, or is it possible to make changes to IxJS's package.json so that Skypack works correctly with the main ix package?

@andersstorhaug
Copy link
Author

A little more info, I can get this library that's dependent on IxJS to work through JSPM which utilizes import maps (+shim). This seems to show that it is indeed IxJS's package.json that makes it incompatible with ESM-based CDNs, such as Skypack, esm.sh, JsDelivr with /+esm.

I'm hoping that a simple change to package.json would allow for these CDNs to be used, but, I'm a little hesitant to attempt a PR myself to that end, given the multiple builds that IxJS has.

@trxcllnt
Copy link
Member

We should be able to update the published package.json to be compatible. I'll add it to my mental todo list.

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

No branches or pull requests

2 participants