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

why the source has changed, but the hash no change?

Open nieyt opened this issue 5 years ago • 4 comments

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 : image

nieyt avatar Jun 25 '19 18:06 nieyt

same problem, rev-manifest not changed unless rerun npx gulp

TangMonk avatar Sep 05 '19 14:09 TangMonk

Same here, I have to run it twice

alliuca avatar Mar 26 '20 13:03 alliuca

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.

alliuca avatar Mar 26 '20 14:03 alliuca

I also ran into this problem and never found a gulp-rev based solution. I ended up using gulp-hash instead.

andyford avatar Apr 09 '20 07:04 andyford