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

Support link modulepreload #118

Closed
uasan opened this issue Nov 29, 2021 · 1 comment
Closed

Support link modulepreload #118

uasan opened this issue Nov 29, 2021 · 1 comment

Comments

@uasan
Copy link

uasan commented Nov 29, 2021

Hello.
The current implementation in Chrome does not support the <link rel=modulepreload>
https://bugs.chromium.org/p/chromium/issues/detail?id=1274871

The specification says that you can specify the as attribute

Let destination be the current state of the as attribute (a destination), or "script" if it is in no state.
https://html.spec.whatwg.org/multipage/links.html#link-type-modulepreload

But as not support and has not valid as value for type json module.

Perhaps it makes sense to add support for the type attribute?

<link rel="modulepreload" href="app.mjs"> - for ESM module
<link rel="modulepreload" href="style.css" type="text/css"> - for assert: { type: 'css' }
<link rel="modulepreload" href="data.json" type="application/json"> - for assert: { type: 'json' }

Thanks.

@uasan
Copy link
Author

uasan commented Dec 4, 2021

Moved: whatwg/html#7388

@uasan uasan closed this as completed Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant