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

Import Maps #184

Closed
LeviPesin opened this issue Oct 5, 2022 · 11 comments
Closed

Import Maps #184

LeviPesin opened this issue Oct 5, 2022 · 11 comments
Labels
accepted An accepted proposal focus-area-proposal Focus Area Proposal

Comments

@LeviPesin
Copy link

Description

Import maps are really useful and really needed for very many developers. They are supported everywhere except Safari and Firefox.

Rationale

They are extremely useful for JavaScript libraries and their developers, for example three.js.

Specification

https://wicg.github.io/import-maps/

Tests

https://wpt.fyi/results/?label=master&label=experimental&aligned&view=subtest&q=import-maps

@LeviPesin LeviPesin added the focus-area-proposal Focus Area Proposal label Oct 5, 2022
@gsnedders gsnedders added this to the Interop 2023 milestone Oct 5, 2022
@foolip
Copy link
Member

foolip commented Oct 6, 2022

It looks like the spec here isn't on the W3C Recommendation Track. @domenic, as the editor of the spec, what's the likely destination of this once it leaves incubation, and when might that happen?

@domenic
Copy link
Member

domenic commented Oct 6, 2022

Ah, right, that's what I forgot to do today---add a redirect! https://html.spec.whatwg.org/#import-maps

@foolip
Copy link
Member

foolip commented Oct 6, 2022

Excellent, thanks @domenic!

@foolip foolip moved this to Proposed in Interop 2023 Oct 7, 2022
@annevk
Copy link
Member

annevk commented Oct 7, 2022

One potential problem here is that WebKit supports a superset: whatwg/html#8355. It would be undesirable if supporting external import maps would give you a lower score.

(Also note that with 3 engines "everywhere except 2" leaves 1. 😊)

@foolip foolip removed this from the Interop 2023 milestone Oct 7, 2022
@foolip
Copy link
Member

foolip commented Oct 17, 2022

This was mentioned by WordPress developer @youknowriad in https://make.wordpress.org/core/2022/10/10/seeking-proposals-for-interop-2023/#comment-43928:

import maps: Would love support without polyfills as this would allows us to improve the way scripts are registered/handled in WP and introduce lazy loaded scripts…

Thanks Riad for sharing!

@gsnedders
Copy link
Member

We probably want to exclude /import-maps/acquiring/modulepreload.html and /import-maps/acquiring/modulepreload-link-header.html.

@tbondwilkinson
Copy link

Import maps are a P4 for Google's closure library

"It's possible this could help with polyfills, maybe?"

@LeviPesin
Copy link
Author

There is a es-module-shims polyfill.

@gsnedders
Copy link
Member

Note /import-maps/data-driven/ are currently failing in WebKit for unrelated reasons (related to when load events are fired on iframe elements).

I don't know how difficult this would be to workaround (it might be as simple as passing {once: true} to event listener), but we probably ought not test totally unrelated behaviour here.

@foolip
Copy link
Member

foolip commented Nov 11, 2022

In the MDN short survey on APIs & JavaScript, "Import Maps" was selected by ~13% of survey takers, putting it in the bottom third of options. (There is some uncertainty as with any survey data.)

@foolip
Copy link
Member

foolip commented Feb 1, 2023

Thank you for proposing Import Maps for inclusion in Interop 2023.

We are pleased to let you know that this proposal was accepted as part of the Modules focus area. You can follow the progress of this Focus Area on the Interop 2023 dashboard.

For an overview of our process, see the proposal selection summary. Thank you for contributing to Interop 2023!

Posted on behalf of the Interop team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted An accepted proposal focus-area-proposal Focus Area Proposal
Projects
No open projects
Status: Proposed
Development

No branches or pull requests

6 participants