Closed timreichen closed 2 years ago
Nice question.
How it works is that all URLs in the import map, and all URL-like specifiers, are converted to absolute URLs first, using the <base>
element. Then, the now-absolute URL-like specifiers are compared to the now-absolute URL-like specifiers in the import map.
Does this make sense? We can also walk through an example, if you have one, or you can check out the tests in https://github.com/web-platform-tests/wpt/tree/master/import-maps/data-driven/resources, e.g. https://github.com/web-platform-tests/wpt/blob/master/import-maps/data-driven/resources/url-specifiers.json is pretty informative.
Thank you for your quick answer. This is what I assumed and what makes most sense to me. Maybe this information could be added to the readme somewhere?
Sure, a pull request would be welcome.
How are paths resolved when both
<base>
tag and an importmap are present in an html file? Which is resolved first?