How to link in HTML the new versioned file in Gulp

0

I have the following task and I'm having trouble linking my new global.css with the new name ( global-9384148031.css ) generated by rev() to my html .

Even though it generates a new file with the correct name in the folder, it does not change in html .

And another problem I'm having is that when it generates a new file with a new name, it does not remove the old one, so I end up with multiple files.

gulp.task('styles', function() {
    return gulp.src('./resources/sass/*.scss')
        .pipe(sass().on('error', sass.logError))
        .pipe((mode.production(csso())))
        .pipe(concat('global.css'))
        .pipe(rev())
        .pipe(gulp.dest('public/css'));
});
    
asked by anonymous 16.11.2018 / 04:54

0 answers