Closed
Description
We do have a set of features for dealing with hashes ("integrity") on Blazor files as well as for applying fingerprints to files, we should move those to static web assets.
- We will add two new properties to the definition of a static web asset "Fingerprint" and "Integrity".
- Fingerprint is the Base36 encoding of the integrity hash that can be used to uniquely fingerprint the file.
- Integrity will be the Base64 encoding of the SHA256 hash, which is what we currently put in the blazor.boot.json manifest.
- We will update DefineStaticWebAssets to automatically compute the fingerprint and hash for the assets being defined.
- The way I envision this working is via "token" replacements. We can support defining tokens in the file name, like
asset.[Fingerprint].razor.js
. - When we are constructing the asset relative path, we replace the
[Fingerprint]
bit with the actual computed fingerprint of the asset, which is stored in item metadata for the item. - We make comparisons based on the relative path and other aspects, so we might need a property separate from the
relative path
(RelativePathTemplate) or similar to make it easier to work.
- The way I envision this working is via "token" replacements. We can support defining tokens in the file name, like