gulp-rev
gulp-rev copied to clipboard
why the source has changed, but the hash no change?
I have changed the source css code, and rebuild the task, but the hashed css name is the same as before.here is the code.
gulp.task('style', () => {
var processors = [
pxtoviewport({
viewportWidth: 750,
viewportUnit: 'vmin'
})
];
return gulp.src(['./h5-cover/style/**/*.css', './h5-cover/style/*.less'])
.pipe(less())
.pipe(postcss(processors))
.pipe(concat({path: 'index.min.css', cwd: ''}))
.pipe(minifyCss())
.pipe(rev())
.pipe(gulp.dest('./resource/css/'))
.pipe(rev.manifest())
.pipe(gulp.dest('./resource/rev/'));
});
Both are the same name :
same problem, rev-manifest not changed unless rerun npx gulp
Same here, I have to run it twice
Actually, it doesn't seem to be an issue with gulp-rev. Found out my postcss task wasn't finished by the time it reached rev()
, so the first time no changes were detected. Fixed that and it all works.
I also ran into this problem and never found a gulp-rev based solution. I ended up using gulp-hash instead.