Use @import-maps/resolve instead of exact match only
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!
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. :)