benhoIIand / grunt-cache-bust

Cache bust static assets using content hashing
MIT License
265 stars 103 forks source link

Error in replaceInFile #222

Open axwel13 opened 7 years ago

axwel13 commented 7 years ago

Hello,

There is an error between the package 1.4.1 and 1.5.0 in replaceInFile.

var replace = [
// abs path
['/' + original, '/' + hashed], // <== the error is here
/* I suggest add in replace array */
[original, hashed],
// relative
[grunt.util.repeat(fileDepth, '../') + original, grunt.util.repeat(fileDepth, '../') + hashed],
 ];
CM-Aprima commented 7 years ago

Was this ever fixed? I am having the same problem.

NicoVIII commented 7 years ago

I have this problem as well. "src/to/file" is not replaced, only "/src/to/file" is