Open
Description
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_integrity
We could add this feature to the import map generated by AssetMapper.
Example
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:
<script type="importmap">
{
"imports": {
"square": "./modules/shapes/square.js"
},
"integrity": {
"./modules/shapes/square.js": "sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC"
}
}
</script>