We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A few days ago, Firefox 138 added support for integrity hashes in import maps, so this feature is now widely supported. See https://caniuse.com/mdn-html_elements_script_type_importmap_integrity
integrity
We could add this feature to the import map generated by AssetMapper.
See https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity_metadata_map
This is how it looks in action. Today, AssetMapper generates the imports key and we'd need to also generate the integrity key of this hash:
imports
<script type="importmap"> { "imports": { "square": "./modules/shapes/square.js" }, "integrity": { "./modules/shapes/square.js": "sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC" } } </script>
The text was updated successfully, but these errors were encountered:
I can work on that ✋ Which algorithm should we make the default?
Sorry, something went wrong.
You should use sha384 by default. It's the algorithm that is used on every examples on MDN and W3C.
sha384
Okay thanks; asked because of https://stackoverflow.com/a/52102596
Started things here some time ago... but it did not raise much passion, so I did not prioritize it
#58722
Woops sorry @smnandre didn’t think of checking PRs 😅
Successfully merging a pull request may close this issue.
Description
A few days ago, Firefox 138 added support for
integrity
hashes in import maps, so this feature is now widely supported. See https://caniuse.com/mdn-html_elements_script_type_importmap_integrityWe could add this feature to the import map generated by AssetMapper.
Example
See https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity_metadata_map
This is how it looks in action. Today, AssetMapper generates the
imports
key and we'd need to also generate theintegrity
key of this hash:The text was updated successfully, but these errors were encountered: