diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js index f95fbe12ac398..4c8ed5d9e4dff 100644 --- a/scripts/rollup/build.js +++ b/scripts/rollup/build.js @@ -527,10 +527,6 @@ function resolveEntryFork(resolvedEntry, isFBBundle) { } async function createBundle(bundle, bundleType) { - if (shouldSkipBundle(bundle, bundleType)) { - return; - } - const filename = getFilename(bundle, bundleType); const logKey = chalk.white.bold(filename) + chalk.dim(` (${bundleType.toLowerCase()})`); @@ -766,6 +762,10 @@ async function buildEverything() { ); } + bundles = bundles.filter(([bundle, bundleType]) => { + return !shouldSkipBundle(bundle, bundleType); + }); + if (process.env.CIRCLE_NODE_TOTAL) { // In CI, parallelize bundles across multiple tasks. const nodeTotal = parseInt(process.env.CIRCLE_NODE_TOTAL, 10);