denoland / import_map

An implementation of WICG Import Maps specification
MIT License
31 stars 14 forks source link

can't map prefixed address with query string #46

Open marcushultman opened 2 years ago

marcushultman commented 2 years ago

Using import_map.json

{
  "imports": {
    "icons-solid-20/": "https://esm.sh/@heroicons/react@2.0.11/20/solid/?alias=react:preact/compat"
  }
}

With script:

import 'icons-solid-20/BeakerIcon';

Will yield error:

Import map diagnostics:
  - Invalid target address "https://esm.sh/@heroicons/react@2.0.11/20/solid/?alias=react:preact/compat" for package specifier "icons-solid-20/". Package address targets must end with "/".
error: Blocked by null entry for ""icons-solid-20/""

Even when putting in a bogus query parameter that ends with "/", the following error is produced:

error: The specifier ""icons-solid-20/BeakerIcon"" backtracks above its prefix ""icons-solid-20/""
marcushultman commented 2 years ago

@bartlomieju