Did gulp.src allowEmpty default change in Gulp 4?
See original GitHub issueI’m trying to upgrade from gulp 3.9.1 to gulp 4.0.0 but my gulpfile is breaking on gulp.src when there are no files matched.
I can fix this by adding the allowEmpty: true
option, which appears to be new in gulp 4.
My question is, did gulp 3 allow empty matches by default?
If the answer is yes then the behaviour of gulp.src has changed between gulp 3 and gulp 4, and I think this should be documented somewhere. If it is not in the documentation, I am happy to submit a PR.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
gulp 4.0 allowEmpty : true is not working for empty array
The allowEmpty option just suppresses the error that is thrown if no match is found—it doesn't change what can be passed in the...
Read more >src() - gulp.js
name type default
buffer boolean function true
read boolean function true
since date timestamp function
Read more >Easily Improve Front-end ASP.NET Core App Development ...
Gulp is a toolkit that helps web developers automate many development tasks such as minification and file conversion.
Read more >How to Migrate to Gulp.js 4.0 - SitePoint
Learn how to migrate to Gulp.js 4.0 and update your 3.0 gulpfile.js configurations. Find out what you need to know about changes in...
Read more >gulpfile error when running gulp command [#3150498] - Drupal
src and have gulp version 4 install on system. Below is a sample code, gulp.src('app/scripts.js', { allowEmpty: true }) .pipe(..
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
Yes and it’s documented.
https://gulpjs.com/docs/en/api/src#errors
The gulp 4 docs aren’t written from the perspective of people upgrading. They are the source of truth for that version. Perhaps you’ve seen our open issue for a Migration Guide?