gulp-rev-replace icon indicating copy to clipboard operation
gulp-rev-replace copied to clipboard

should gulp-rev-replace rehash a file?

Open orlando opened this issue 10 years ago • 1 comments

I'm running gulp-rev-all and then gulp-rev-replace, gulp-rev-replace changes the already revved files, but keeps the same hash (I don't know if that's the correct behaviour).

Should gulp-rev-replace rehash the file?, if that's expected, is there anything I can do to get it working?

Thanks!

orlando avatar Jul 28 '15 22:07 orlando

It seems to me that the current recipe to "use gulp-rev-replace without gulp-useref" is indeed problematic, as it hashes the file before modifying its contents. If only a referenced file changed (e.g. an image or a font in a css file), the file will keep its hash even though its content changed. @orlando's suggestion is interesting. As rev-replace changes the content, it should also update the hash in the rev-manifest to reflect that change if need be. What do you think?

mlarcher avatar Oct 26 '15 21:10 mlarcher