Home / File/ ReactFlightClientConfigBundlerESM.js — react Source File

ReactFlightClientConfigBundlerESM.js — react Source File

Architecture documentation for ReactFlightClientConfigBundlerESM.js, a javascript file in the react codebase. 2 imports, 0 dependents.

File javascript BabelCompiler Validation 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  04874586_9e27_6825_83bc_01ed3c674190["ReactFlightClientConfigBundlerESM.js"]
  d8f20c67_f5fa_0f0a_c967_c41fd9ffce07["ReactTypes"]
  04874586_9e27_6825_83bc_01ed3c674190 --> d8f20c67_f5fa_0f0a_c967_c41fd9ffce07
  d760bfed_8ff4_8e36_bbe8_dd60e8ce6809["ReactFlightClientConfig"]
  04874586_9e27_6825_83bc_01ed3c674190 --> d760bfed_8ff4_8e36_bbe8_dd60e8ce6809
  style 04874586_9e27_6825_83bc_01ed3c674190 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 {
  Thenable,
  FulfilledThenable,
  RejectedThenable,
  ReactDebugInfo,
  ReactIOInfo,
  ReactAsyncInfo,
} from 'shared/ReactTypes';

import type {ModuleLoading} from 'react-client/src/ReactFlightClientConfig';

export type ServerConsumerModuleMap = string; // Module root path

export type ServerManifest = string; // Module root path

export type ServerReferenceId = string;

import {prepareDestinationForModuleImpl} from 'react-client/src/ReactFlightClientConfig';

export opaque type ClientReferenceMetadata = [
  string, // module path
  string, // export name
];

// eslint-disable-next-line no-unused-vars
export opaque type ClientReference<T> = {
  specifier: string,
  name: string,
};

// The reason this function needs to defined here in this file instead of just
// being exported directly from the WebpackDestination... file is because the
// ClientReferenceMetadata is opaque and we can't unwrap it there.
// This should get inlined and we could also just implement an unwrapping function
// though that risks it getting used in places it shouldn't be. This is unfortunate
// but currently it seems to be the best option we have.
export function prepareDestinationForModule(
  moduleLoading: ModuleLoading,
  nonce: ?string,
  metadata: ClientReferenceMetadata,
) {
  prepareDestinationForModuleImpl(moduleLoading, metadata[0], nonce);
}

export function resolveClientReference<T>(
  bundlerConfig: ServerConsumerModuleMap,
  metadata: ClientReferenceMetadata,
): ClientReference<T> {
  const baseURL = bundlerConfig;
  return {
    specifier: baseURL + metadata[0],
// ... (155 more lines)

Domain

Subdomains

Dependencies

  • ReactFlightClientConfig
  • ReactTypes

Frequently Asked Questions

What does ReactFlightClientConfigBundlerESM.js do?
ReactFlightClientConfigBundlerESM.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 ReactFlightClientConfigBundlerESM.js?
ReactFlightClientConfigBundlerESM.js defines 1 function(s): prepareDestinationForModule.
What does ReactFlightClientConfigBundlerESM.js depend on?
ReactFlightClientConfigBundlerESM.js imports 2 module(s): ReactFlightClientConfig, ReactTypes.
Where is ReactFlightClientConfigBundlerESM.js in the architecture?
ReactFlightClientConfigBundlerESM.js is located at packages/react-server-dom-esm/src/client/ReactFlightClientConfigBundlerESM.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-server-dom-esm/src/client).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free