Gulp 4 .watch() doesn't update file modified time
See original GitHub issueWhat were you expecting to happen?
When I change and save partial scss file, gulp should update modified time of main scss file.
What actually happened?
css/
├ _external.scss
└ main.scss
main.css
gulpfile.js
I edit and save _external.scss, created and updated main.css. But gulp doesn’t update modified time of main.css. When I change and save main.scss, gulp updates modified time of main.css.
In other words, gulp will not update modified time of main.css when I edit and save partial scss file. In this case, which is true, specifications or bugs?
Please post a sample of your gulpfile (preferably reduced to just the bit that’s not working)
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('style', function() {
return gulp.src('css/main.scss')
.pipe(sass())
.pipe(gulp.dest('./'));
});
gulp.task('watch', function() {
gulp.watch('css/**/*.scss', gulp.series('style'));
});
What version of gulp are you using?
4.0.0
What versions of npm and node are you using?
npm 6.1.0
node 8.9.3
10.5.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Gulp v4 doesn't update the browser - Stack Overflow
The first time you run gulp.default you may need refresh the browser if you have some changes already made to your files.
Read more >Watching Files | gulp.js
The watch() API connects globs to tasks using a file system watcher. It watches for changes to files that match the globs and...
Read more >Gulp 4: A Sample Project - Shark Coder
Here is a simple guide on installing and configuring Gulp 4 for those who design a static web page which doesn't require backend...
Read more >Browsersync + Gulp.js
Browsersync makes your browser testing workflow faster by synchronising URLs, interactions and code changes across multiple devices.
Read more >Quick setup for Gulp 4 + Browsersync + Sass - Coder Coder
It works by spinning up a local server and syncing it up to your browser. Then, anytime you make a change in your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Currently, this is a feature of gulp 4 due to a limitation of node’s fs.Stat object. If you need mtime to change - you need to modify the mtime on the files in your pipeline.
If you’d like to help work on a solution for this - we have an open issue at https://github.com/gulpjs/vinyl/issues/105
I’m using a
gulp-touch-cmd
plugin implemented in a similar way now.