ReactFlightImportMetadata.js — react Source File
Architecture documentation for ReactFlightImportMetadata.js, a javascript file in the react codebase. 0 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR ecf040cb_2f00_8f57_1b89_0fb87fd99487["ReactFlightImportMetadata.js"] 030915be_dad8_6901_9c1b_0baca4915190["ReactFlightWebpackPlugin.js"] 030915be_dad8_6901_9c1b_0baca4915190 --> ecf040cb_2f00_8f57_1b89_0fb87fd99487 0fb80115_9d90_91b4_1e5b_f4567bf2b01c["ReactFlightClientConfigBundlerWebpack.js"] 0fb80115_9d90_91b4_1e5b_f4567bf2b01c --> ecf040cb_2f00_8f57_1b89_0fb87fd99487 86be9700_4cd0_5399_1f70_90254d1235ad["ReactFlightServerConfigWebpackBundler.js"] 86be9700_4cd0_5399_1f70_90254d1235ad --> ecf040cb_2f00_8f57_1b89_0fb87fd99487 style ecf040cb_2f00_8f57_1b89_0fb87fd99487 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
*/
export type ImportManifestEntry = {
id: string,
// chunks is a double indexed array of chunkId / chunkFilename pairs
chunks: Array<string>,
name: string,
async?: boolean,
};
// This is the parsed shape of the wire format which is why it is
// condensed to only the essentialy information
export type ImportMetadata =
| [
/* id */ string,
/* chunks id/filename pairs, double indexed */ Array<string>,
/* name */ string,
/* async */ 1,
]
| [
/* id */ string,
/* chunks id/filename pairs, double indexed */ Array<string>,
/* name */ string,
];
export const ID = 0;
export const CHUNKS = 1;
export const NAME = 2;
// export const ASYNC = 3;
// This logic is correct because currently only include the 4th tuple member
// when the module is async. If that changes we will need to actually assert
// the value is true. We don't index into the 4th slot because flow does not
// like the potential out of bounds access
export function isAsyncImport(metadata: ImportMetadata): boolean {
return metadata.length === 4;
}
Domain
Subdomains
Functions
Imported By
Source
Frequently Asked Questions
What does ReactFlightImportMetadata.js do?
ReactFlightImportMetadata.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 ReactFlightImportMetadata.js?
ReactFlightImportMetadata.js defines 1 function(s): isAsyncImport.
What files import ReactFlightImportMetadata.js?
ReactFlightImportMetadata.js is imported by 3 file(s): ReactFlightClientConfigBundlerWebpack.js, ReactFlightServerConfigWebpackBundler.js, ReactFlightWebpackPlugin.js.
Where is ReactFlightImportMetadata.js in the architecture?
ReactFlightImportMetadata.js is located at packages/react-server-dom-webpack/src/shared/ReactFlightImportMetadata.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-server-dom-webpack/src/shared).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free