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

Support aliasing to github repo #780

Open
egfx-notifications opened this issue Dec 20, 2023 · 2 comments
Open

Support aliasing to github repo #780

egfx-notifications opened this issue Dec 20, 2023 · 2 comments
Labels
bug Something isn't working deno Not working in Deno

Comments

@egfx-notifications
Copy link

I use esm.sh to import a patched version of ajv from my fork until they release a new official version with my patch. Importing my version itself works fine, but there is also the separate library ajv-formats which uses ajv inside. I tried aliasing ajv for the ajv-formats import, but this does not seem to work. Is aliasing to Github repos possible?

Working ajv import:
https://esm.sh/gh/egfx-notifications/ajv@esm-sh-patch1/

Broken alias:
https://esm.sh/[email protected]?alias=ajv:gh/egfx-notifications/ajv@esm-sh-patch1

Results in the following error message in Deno:

error: Import 'https://esm.sh/v135/[email protected]/X-YS9hanY6Z2gvZWdmeC1ub3RpZmljYXRpb25zL2FqdkBlc20tc2gtcGF0Y2gx/denonext/egfx-notifications/ajv@esm-sh-patch1/dist/compile/codegen.js' failed: 500 Internal Server Error
@egfx-notifications egfx-notifications added the deno Not working in Deno label Dec 20, 2023
@ije
Copy link
Member

ije commented Dec 21, 2023

try to add ?external=ajv then specify ajv with your patch url in the import map.

i will fix the bug later

@ije ije added the bug Something isn't working label Dec 21, 2023
@egfx-notifications
Copy link
Author

try to add ?external=ajv then specify ajv with your patch url in the import map.

Thank you, that does exactly what I wanted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deno Not working in Deno
Projects
None yet
Development

No branches or pull requests

2 participants