gulp-flatMap
gulp-flatMap copied to clipboard
Processing too many folders cause freezing gulp task
Gulp says "task didnt complete" when i tried to process more than 22 folders with flatmap:
gulp.src(app.blocks) //more than 22 folders
.pipe(flatmap((stream, file) => {
return stream;
}))
Detail description here: https://stackoverflow.com/q/49394845/9525161
Hmm, from the SO discussion this looks like it's a problem in Gulp 4, which I unfortunately haven't tested it in. Might be something ha changed that causes it to not work anymore.
But, why don't you return the stream from the function? As in, return gulp.src()....
.
Also, from the full code in SO it looks like you don't need this plugin, as you don't map each file in the stream into multiple files. In general, if you don't use the stream inside the function, then you don't need gulp-flatmap. I would suggest you try with gulp-tap instead
Well, i really don't need flatmap for this particular task, just was too lazy to change the code. I've tried return gulp.src(), with the same effect. Now i use glob, i just wanted to let you know there might be bug or something.
Thanks for letting me know, I will look into it :+1: