Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External import maps #6026

Open
lgarron opened this issue Sep 17, 2021 · 0 comments
Open

External import maps #6026

lgarron opened this issue Sep 17, 2021 · 0 comments

Comments

@lgarron
Copy link

lgarron commented Sep 17, 2021

Chrome supports inline import maps:

<script type="importmap">
{
  "imports": {
    "cubing/alg": "https://cdn.cubing.net/js/cubing/alg",
    "cubing/twisty": "https://cdn.cubing.net/js/cubing/twisty"
  }
}
</script>

But not this:

<script type="importmap" src="import-map.importmap"></script>

If you try to use the latter, you get an error:

External import maps are not yet supported.

Import maps are all about ergonomics, and being able to reuse an import map without adding it into the source of every page is an important part of that functionality. It's always been in the spec, it just hasn't been implemented by any browsers yet.

Would it make more sense to annotate https://caniuse.com/import-maps with "partial support" (for browsers that support inline import maps) or to add a separate entry for external import maps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants