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

Use @import-maps/resolve instead of exact match only #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zetlen
Copy link

@zetlen zetlen commented Mar 8, 2024

Summary

Upgrade module resolution from the current exact-match-only approach to the current standard of import maps resolution, including trailing-slash specifiers. And, try to do this while sticking to the
minimalist spirit of this tool.

Changes

  • Add @import-maps/resolve dependency, which tracks the reference implementation.

  • Use it in the remap() function instead of an exact-match test.

  • Add the "base URL" argument, with a default to localhost (if someone needs to customize this, they know what they're doing)

Thanks for your work on this!

@getify
Copy link
Owner

getify commented Mar 8, 2024

thank you! took a quick look, seems great to me.

will try to find some time to test this locally on a few of my projects to make sure it still works as expected there. :)

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

Successfully merging this pull request may close these issues.

2 participants