gulp.watch with **/*.js and multiple globs not working on Windows
See original GitHub issueWhen watching files with Gulp 4, I have the following watch:
gulp.watch(['app/**/*.js', 'app/components/**/*.html']);
On OS X, it works fine for both JS and HTML files, but on Windows 7, making a file change to a JS file does not get detected.
Changing this to the following fixes the issue:
gulp.watch(['app/**/*']);
Also, watching only JS files also works as intended:
gulp.watch(['app/**/*.js']);
It seems only the combination of both globs breaks something causing JS files not to be watched on windows.
Possibly related to https://github.com/floatdrop/gulp-watch/issues/194
Issue Analytics
- State:
- Created 8 years ago
- Reactions:7
- Comments:47 (14 by maintainers)
Top Results From Across the Web
gulp watch is not always working - Stack Overflow
Having gulp.watch(['./src/**/*.js', './src/*.js'], ['js']) will work. Keep in mind watch can take an array of strings to watch for, don't call it multiple...
Read more >watch() - gulp.js
name type default
ignoreInitial boolean true
delay number 200
queue boolean true
Read more >Gulp Not Working Gulp Watch - ADocLib
Run gulp start to fire multiple tasks & run gulp js or gulp gulpSass for specific task. 2. The solution again is to...
Read more >Using Gulp 4 in your workflow for Sass and JS files
Install Gulp by running npm install gulp . Install other npm packages for your Gulp workflow. Create a gulpfile.js file in your project...
Read more >Getting Started with Gulp.js - Semaphore Tutorial
Learn how to set up and use Gulp.js, a task runner for Node.js based on Node streams ... The watch task will continue...
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
+1, I repro this on Windows 10, x64. Any way I can help?
@puranjayjain sorry, not sure how to debug this, as I don’t have access to windows. And quite frankly, since I only work on Mac myself, this issue doesn’t impact me much so I don’t want to spend too much more time on it.
If this comes back to bite me again some time I might spend some more time analysing it, but for now I wouldn’t know what to do about it.