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.