webpack-plugin-hash-output
webpack-plugin-hash-output copied to clipboard
feature(sourcemap&cssMinify)
feature(sourcemap&cssMinify):
- sourcemap support
- ignore sourcemap inline comment while generate hash
- replace content file inline sourcemap comment hash to new hash
- change sourcemap file to have new hash
- support optimize-cssnano-plugin(minify css plugin).We should generate hash after this plugin
- support optimize-cssnano-plugin in function
replaceStringInAsset
- when set optimize-cssnano-plugin disable sourcemap, css map in assets will be deleted
The nice thing about this is that if the js is unchanged, it will get the same hash after every webpack run, which means that browsers will only fetch really unchanged js files. It would be great to see this merged @scinos 😬
Any updates @scinos ? Compatibility with source-maps would be a huge plus! :D
I found another source of "self"-references: license files.
How about ignoring the name of the file when calculating the file hash? So if the file is called foo_123484.js
, the hash calculation should find all mentions of foo_123484(.extregex)
, check if they are files, and replace them with equal length \0
strings. Afterwards, rename the file and any other references and files found.