webpack-plugin-hash-output icon indicating copy to clipboard operation
webpack-plugin-hash-output copied to clipboard

feature(sourcemap&cssMinify)

Open WilsonLiu95 opened this issue 6 years ago • 3 comments

feature(sourcemap&cssMinify):

  1. 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
  1. 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

WilsonLiu95 avatar Feb 15 '19 12:02 WilsonLiu95

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 😬

wmertens avatar Jul 30 '19 09:07 wmertens

Any updates @scinos ? Compatibility with source-maps would be a huge plus! :D

juliomrc avatar Sep 11 '19 14:09 juliomrc

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.

wmertens avatar Oct 06 '19 19:10 wmertens