#2811·gulp

src() doesn't work with wildcards (4.0.2 -> 5.0.0)

Author: lik3asCreated Jun 24, 2024Updated Jun 26, 2025

What were you expecting to happen?

all html files in src/html/**/*.html to be in the dist/ directory

What actually happened?

none of the files were in the dist/ dir

Please give us a sample of your gulpfile

javascript
gulp.task("build-html", async function () {
  return gulp
    .src("src/html/**/*.html")
    .pipe(
      fileinclude({
        context: layout,
        prefix: "@@",
        basepath: "@file",
        indent: true,
      })
    )
    .pipe(gulp.dest("dist"));
});

Terminal output / screenshots

gulpjs1

bash
$ yarn gulp build-html
$ ls dist/

Please provide the following information:

  • OS & version: Ubuntu 22.04.4 (WSL 2)
  • node version: 22.0.0
  • npm version: 9.6.4
  • gulp version: 5.0.0

Additional information

When using 4.0.2, the program works as expected. So the current solution is downgrading the gulp version.