You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following does not work when trying to run any Gulp tasks:
importreadfrom"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(asyncfunction(file){awaitimport("./gulp/"+file);});
When using the require syntax the code works fine:
constread=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.
The text was updated successfully, but these errors were encountered:
The following does not work when trying to run any Gulp tasks:
When using the
require
syntax the code works fine: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.The text was updated successfully, but these errors were encountered: