Improve assetFingerprint defaults
The enableAssetFingerprint
feature now behaves differently, and is much more robust as a result. This may be a breaking change if you're currently using the feature in a non-trivial way:
- Remove non-fingerprinted files by default. Feedback suggested keeping
them around only ever resulted in errors being missed. - Do string replacement of logical asset paths to fingerprinted asset
paths against a set of known file extension (starting small with html,
css, js, and xml). Override withfiles.assetFingerPrint.textFiles
prop - Add images & webfonts to the default set of fingerprinted asset
(this was always desired but not feasible without string substitution) - Simplify task loading by placing assetFingerprint task at the very
end, instead of slicing it before the pages (another ramification of
the string replacement strategy) - Stop mutating the pages' context object with fingerprinted URLs,
instead (you guessed it), lean on the string replacement feature of
grunt-asset-fingerprint