WICG / import-maps

How to control the behavior of JavaScript imports
https://html.spec.whatwg.org/multipage/webappapis.html#import-maps
Other
2.68k stars 69 forks source link

Clarification of RHS bare specifiers in reduced implementation #192

Closed guybedford closed 3 years ago

guybedford commented 4 years ago

I was just looking at the spec and tests for the case of RHS bare specifiers like:

{
  "imports": {
    "foo": "foo.js"
  }
}

As far as I can tell from the spec and implementation import 'foo' with the above is an error right? And this is to leave the door open for cascading implementations?

Seems a useful thing to clearly document as some users may find this confusing.

domenic commented 4 years ago

Well, it's a parse-time error in https://wicg.github.io/import-maps/#parse-a-url-like-import-specifier, not an import-time error. But yes, that's the current idea.

+1 on documenting.