Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scripts/rollup/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const requestedBundleTypes = (argv.type || '')
const requestedBundleNames = (argv._[0] || '')
.split(',')
.map(type => type.toLowerCase());
const forcePrettyOutput = argv['pretty'];
const syncFBSourcePath = argv['sync-fbsource'];
const syncWWWPath = argv['sync-www'];
const shouldExtractErrors = argv['extract-errors'];
Expand Down Expand Up @@ -191,7 +192,7 @@ function getPlugins(
const isInGlobalScope = bundleType === UMD_DEV || bundleType === UMD_PROD;
const isFBBundle = bundleType === FB_DEV || bundleType === FB_PROD;
const isRNBundle = bundleType === RN_DEV || bundleType === RN_PROD;
const shouldStayReadable = isFBBundle || isRNBundle;
const shouldStayReadable = isFBBundle || isRNBundle || forcePrettyOutput;
return [
// Extract error codes from invariant() messages into a file.
shouldExtractErrors && {
Expand Down Expand Up @@ -471,7 +472,9 @@ async function buildEverything() {
}

console.log(Stats.printResults());
Stats.saveResults();
if (!forcePrettyOutput) {
Stats.saveResults();
}

if (shouldExtractErrors) {
console.warn(
Expand Down