-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
choose CDN for each dependency, or auto-detect package registry? #59
Comments
We separate registries from CDN providers, and each registry can be assigned a default provider so in this way it is possible to have cross-provider choices made automatically. Ideally jspm.io would support JSR and we can default to the JSPM provider still overall, but if we don't support that we could always default to the deno one too in the mean time. |
Cool. Another use case is that, sometimes, one CDN doesn't work for whatever reason, so it would be nice to swap out the CDN of a specific dependency for another. We can do that by hand by editing the importmap after the fact, but maybe this would be convenient in the UI? That way anyone who follows the edit link will get the same import map generated (as opposed to one that is not yet edited to be in working state). |
You can configure the provider rules by package automatically in the generator. See https://jspm.org/docs/generator/stable/interfaces/GeneratorOptions.html#providers. Multi-CDN is of course great for redundancy but that only works when all CDNs provide all registries, which is why the JSPM CDN aims to provide all registries. |
It might be nice to be able to choose which CDN each library comes from.
I'm thinking that this might be useful when adding when adding new CDNs like JSR (#58), because if a package gets published there but all of the owners of its dependencies have not yet published there, then dependencies need to come from somewhere else (which is a piece of cake for import maps!).
Or maybe Generator can detect this? Maybe JSR and NPM could be treated as base registries (what about deno x?), and for example maybe Generator can look to see if a JSR package depends on NPM packages and then use jsdelivr (etc) for that?
For example this package depends on NPM packages:
https://jsr.io/@provsalt/monero-checker/dependencies
The text was updated successfully, but these errors were encountered: