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

npm package aliases don't work #337

Open
epicfaace opened this issue Jan 8, 2023 · 0 comments
Open

npm package aliases don't work #337

epicfaace opened this issue Jan 8, 2023 · 0 comments

Comments

@epicfaace
Copy link

Package aliases don't work for npm.

For example, if I have a package that aliases "ajv" to "ajv8":

"dependencies": {
    "ajv8": "npm:ajv@^8.11.0"
}

Then, when I try to import the package on skypack, skypack looks through skypack for a package with that specific alias, e.g. "ajv8", when really, it should be resolving the alias and looking for "ajv" instead:

image

image

image

Here's a concrete example using @rjsf/validator-ajv8: https://codepen.io/epicfaace/pen/ZEjLxMV. You can run it and then view the js console to see the error.

And here's the alias code in that package:

https://github.com/rjsf-team/react-jsonschema-form/blob/ff034df8f6b7080bf76b7f25e0b1f400fbc818e5/packages/validator-ajv8/package.json#L31

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

1 participant