Closed arunkumar413 closed 2 years ago
The exclude param is supposed to be a regex.
const dirTree = require("directory-tree");
const filteredTree = dirTree("/some/path", { exclude: /some_path_to_exclude/ });
So try doing:
const tree = dirTree("./", { exclude: /node_modules/ });
const tree = dirTree("./", { exclude: "/node_modules" });
This throws an error