-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gulp 4 and mtime on output css file #301
Comments
A workaround in the meantime is .pipe( through2.obj( function( file, enc, cb ) {
var date = new Date();
file.stat.atime = date;
file.stat.mtime = date;
cb( null, file );
}) )
.pipe( gulp.dest( './' ) ) (This is what I used to test... I didn't actually compile gulp-less and really test.) |
👍 This change in gulp 4 breaks plugins such as gulp-less-changed, gulp-newer, et al. that rely on the output file times for incremental build optimisation. |
I am attempting to utilize the work around solution because it is hosing up my ability to add versioning to css files. I understand that this has nothing to do with LESS but any help would be appreciated. I would like to add the pipe that WraithKenny started above: .pipe( through2.obj( function( file, enc, cb ) { How can I add that pipe to work with the following function function cssversion () { FYI, this new "feature" is really annoying |
Gulp 4 intentionally avoids updating the mtime of output files, as a "new feature."
As per gulpjs/gulp#2193 (comment) gulp-less should deliberately update the mtime of the output css file itself, else the file will always retain it's old mtime (for example, my compiled css file, which I've changed today, still says last updated aug 24th).
The text was updated successfully, but these errors were encountered: