You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Just like CJS packages are distributed via NPM, some are distributed via GitHub.
Describe the solution you would like.
Just like jsDelivr supports converting NPM packages from CJS to ESM, it could support converting GitHub packages from CJS to ESM, i.e. : https://cdn.jsdelivr.net/gh/user/repo@version/file/+esm
Do you have examples of some popular projects that would benefit from this? There are a couple of reasons we didn't do this so far, e.g.:
With npm packages, it's clear any dependencies should also be loaded from npm. With GitHub, that's no longer the case (people might be referring to other registries).
Most projects using /gh/ are not JS projects; most JS projects publish to npm anyway.
Do you have examples of some popular projects that would benefit from this?
No, because popular projects always publish to NPM. The point of this is precisely to be able to use unpopular projects.
With npm packages, it's clear any dependencies should also be loaded from npm
When a module is run locally, NPM is also the default registry anyway.
Most projects using /gh/ are not JS projects; most JS projects publish to npm anyway.
True. But this feature would still be useful to minorities.
Here's an additional use case of this feature, although minor as well : importing a development version or a forked version of a package (whether popular or not) without needing to publish it.
Is your feature request related to a problem? Please describe.
Just like CJS packages are distributed via NPM, some are distributed via GitHub.
Describe the solution you would like.
Just like jsDelivr supports converting NPM packages from CJS to ESM, it could support converting GitHub packages from CJS to ESM, i.e. :
https://cdn.jsdelivr.net/gh/user/repo@version/file/+esm
Describe alternatives you have considered.
None
Requisites
Additional content
None
Thanks
The text was updated successfully, but these errors were encountered: