diff --git a/bin/copy-dist.ts b/bin/copy-dist.ts index 586650811..38413b1b9 100644 --- a/bin/copy-dist.ts +++ b/bin/copy-dist.ts @@ -82,13 +82,10 @@ function cleanupNodeModules() { "tests" ]); - const filteredDirs = nodeDir + nodeDir .filter(el => el.isDirectory() && filterableDirs.has(el.name)) - .map(el => path.join(DEST_DIR, el.parentPath, el.name)); - - filteredDirs.forEach(dir => { - fs.removeSync(dir); - }) + .map(el => path.join(DEST_DIR, el.parentPath, el.name)) + .forEach(dir => fs.removeSync(dir)); }