import-remap icon indicating copy to clipboard operation
import-remap copied to clipboard

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

Open zetlen opened this issue 1 year ago • 1 comments

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!

zetlen avatar Mar 08 '24 17:03 zetlen

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. :)

getify avatar Mar 08 '24 20:03 getify