From 7447761fb752fbe62bde6c79220394a5c2c3436c Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Fri, 6 Oct 2023 12:29:01 -0700 Subject: [PATCH] fix(build): ignore empty bundle directories (#27491) These are often left after some file moves. --- utils/build/build.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/build/build.js b/utils/build/build.js index 708e5456e8..60524770d1 100644 --- a/utils/build/build.js +++ b/utils/build/build.js @@ -195,8 +195,10 @@ for (const pkg of workspace.packages()) { const bundlesDir = path.join(pkg.path, 'bundles'); if (!fs.existsSync(bundlesDir)) continue; - for (const bundle of fs.readdirSync(bundlesDir)) - bundles.push(path.join(bundlesDir, bundle)); + for (const bundle of fs.readdirSync(bundlesDir)) { + if (fs.existsSync(path.join(bundlesDir, bundle, 'package.json'))) + bundles.push(path.join(bundlesDir, bundle)); + } } // Update test runner.