-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
The following does not work when trying to run any Gulp tasks:
import read from "fs-readdir-recursive";
/**
* This will load all js in the gulp directory
*/
read("./gulp")
.filter(function (file) {
console.log(file);
return /\.(js)$/i.test(file);
})
.map(async function (file) {
await import("./gulp/" + file);
});When using the require syntax the code works fine:
const read = require("fs-readdir-recursive");
/**
* This will load all js in the gulp directory
*/
read("./gulp")
.filter(function (file) {
console.log(file);
return /\.(js)$/i.test(file);
})
.map(function (file) {
require("./gulp/" + file);
});The ESM syntax is the problem. Would love to see support added for this! In the meantime I'll have to manually import each file from the gulp directory.
Metadata
Metadata
Assignees
Labels
No labels