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 cannot be used with HTTP Link rel=modulepreload #9274

Open
allstarschh opened this issue May 11, 2023 · 2 comments
Open

Import maps cannot be used with HTTP Link rel=modulepreload #9274

allstarschh opened this issue May 11, 2023 · 2 comments

Comments

@allstarschh
Copy link

When the modulepreload feature is served from HTTP Link header,
it will fetch a modulepreload module script graph, which will in turn disallow further import maps, that will make import maps won't be parsed at all, see Prepare the script element, step 32.

Latest HTML spec commit: d67f8f7

This will make import maps totally useless if the modulepreload is served from HTTP Link header.

@annevk
Copy link
Member

annevk commented May 11, 2023

cc @domenic @noamr

@domenic
Copy link
Member

domenic commented May 12, 2023

Yep, this is a known issue, and "working as intended".

Investigations into fixing this generally take the form of finding a solution for allowing import maps to update over time. See WICG/import-maps#92, https://github.com/guybedford/import-maps-extensions#lazy-loading-of-import-maps, and guybedford/import-maps-extensions#17 for the latest discussions on how we could do that. We know it's a high-priority request from web developers, but Chromium at least hasn't been able to find the engineering bandwidth for working on it so far.

/cc @hiroshige-g

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

No branches or pull requests

3 participants