ReactFlightClientConfigBundlerWebpackBrowser.js — react Source File
Architecture documentation for ReactFlightClientConfigBundlerWebpackBrowser.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR f69e300f_c523_bd54_35b8_9ea0250d7ffe["ReactFlightClientConfigBundlerWebpackBrowser.js"] d8f20c67_f5fa_0f0a_c967_c41fd9ffce07["ReactTypes"] f69e300f_c523_bd54_35b8_9ea0250d7ffe --> d8f20c67_f5fa_0f0a_c967_c41fd9ffce07 style f69e300f_c523_bd54_35b8_9ea0250d7ffe fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {
ReactDebugInfo,
ReactIOInfo,
ReactAsyncInfo,
} from 'shared/ReactTypes';
const chunkMap: Map<string, string> = new Map();
/**
* We patch the chunk filename function in webpack to insert our own resolution
* of chunks that come from Flight and may not be known to the webpack runtime
*/
const webpackGetChunkFilename = __webpack_require__.u;
__webpack_require__.u = function (chunkId: string) {
const flightChunk = chunkMap.get(chunkId);
if (flightChunk !== undefined) {
return flightChunk;
}
return webpackGetChunkFilename(chunkId);
};
export function loadChunk(chunkId: string, filename: string): Promise<mixed> {
chunkMap.set(chunkId, filename);
return __webpack_chunk_load__(chunkId);
}
// We cache ReactIOInfo across requests so that inner refreshes can dedupe with outer.
const chunkIOInfoCache: Map<string, ReactIOInfo> = __DEV__
? new Map()
: (null: any);
export function addChunkDebugInfo(
target: ReactDebugInfo,
chunkId: string,
filename: string,
): void {
if (!__DEV__) {
return;
}
let ioInfo = chunkIOInfoCache.get(chunkId);
if (ioInfo === undefined) {
const scriptFilename = __webpack_get_script_filename__(chunkId);
let href;
try {
// $FlowFixMe
href = new URL(scriptFilename, document.baseURI).href;
} catch (_) {
href = scriptFilename;
}
let start = -1;
let end = -1;
// ... (70 more lines)
Domain
Subdomains
Functions
Dependencies
- ReactTypes
Source
Frequently Asked Questions
What does ReactFlightClientConfigBundlerWebpackBrowser.js do?
ReactFlightClientConfigBundlerWebpackBrowser.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in ReactFlightClientConfigBundlerWebpackBrowser.js?
ReactFlightClientConfigBundlerWebpackBrowser.js defines 2 function(s): __webpack_require__, addChunkDebugInfo.
What does ReactFlightClientConfigBundlerWebpackBrowser.js depend on?
ReactFlightClientConfigBundlerWebpackBrowser.js imports 1 module(s): ReactTypes.
Where is ReactFlightClientConfigBundlerWebpackBrowser.js in the architecture?
ReactFlightClientConfigBundlerWebpackBrowser.js is located at packages/react-server-dom-webpack/src/client/ReactFlightClientConfigBundlerWebpackBrowser.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-server-dom-webpack/src/client).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free