build.js — react Source File
Architecture documentation for build.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
'use strict';
const rollup = require('rollup');
const babel = require('@rollup/plugin-babel').babel;
const closure = require('./plugins/closure-plugin');
const flowRemoveTypes = require('flow-remove-types');
const {dts} = require('rollup-plugin-dts');
const prettier = require('rollup-plugin-prettier');
const replace = require('@rollup/plugin-replace');
const typescript = require('@rollup/plugin-typescript');
const stripBanner = require('rollup-plugin-strip-banner');
const chalk = require('chalk');
const resolve = require('@rollup/plugin-node-resolve').nodeResolve;
const fs = require('fs');
const childProcess = require('child_process');
const argv = require('minimist')(process.argv.slice(2));
const Modules = require('./modules');
const Bundles = require('./bundles');
const Stats = require('./stats');
const Sync = require('./sync');
const sizes = require('./plugins/sizes-plugin');
const useForks = require('./plugins/use-forks-plugin');
const dynamicImports = require('./plugins/dynamic-imports');
const externalRuntime = require('./plugins/external-runtime-plugin');
const Packaging = require('./packaging');
const {asyncRimRaf} = require('./utils');
const codeFrame = require('@babel/code-frame').default;
const Wrappers = require('./wrappers');
const commonjs = require('@rollup/plugin-commonjs');
const RELEASE_CHANNEL = process.env.RELEASE_CHANNEL;
// Default to building in experimental mode. If the release channel is set via
// an environment variable, then check if it's "experimental".
const __EXPERIMENTAL__ =
typeof RELEASE_CHANNEL === 'string'
? RELEASE_CHANNEL === 'experimental'
: true;
// Errors in promises should be fatal.
let loggedErrors = new Set();
process.on('unhandledRejection', err => {
if (loggedErrors.has(err)) {
// No need to print it twice.
process.exit(1);
}
throw err;
});
const {
NODE_ES2015,
ESM_DEV,
ESM_PROD,
NODE_DEV,
NODE_PROD,
NODE_PROFILING,
BUN_DEV,
BUN_PROD,
FB_WWW_DEV,
FB_WWW_PROD,
// ... (837 more lines)
Domain
Subdomains
Functions
- buildEverything()
- createBundle()
- forbidFBJSImports()
- getBabelConfig()
- getBundleTypeFlags()
- getFormat()
- getPlugins()
- getRollupInteropValue()
- getRollupOutputOptions()
- handleRollupError()
- handleRollupWarning()
- isProductionBundleType()
- isProfilingBundleType()
- parseRequestedNames()
- resolveEntryFork()
- runShellCommand()
- shouldSkipBundle()
Source
Frequently Asked Questions
What does build.js do?
build.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Optimization subdomain.
What functions are defined in build.js?
build.js defines 17 function(s): buildEverything, createBundle, forbidFBJSImports, getBabelConfig, getBundleTypeFlags, getFormat, getPlugins, getRollupInteropValue, getRollupOutputOptions, handleRollupError, and 7 more.
Where is build.js in the architecture?
build.js is located at scripts/rollup/build.js (domain: BabelCompiler, subdomain: Optimization, directory: scripts/rollup).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free