Home / Function/ forks../packages/react-server/src/ReactFlightServerConfig.js() — react Function Reference

forks../packages/react-server/src/ReactFlightServerConfig.js() — react Function Reference

Architecture documentation for the forks../packages/react-server/src/ReactFlightServerConfig.js() function in forks.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  a26b25c2_f491_acb5_0498_94a5b705d87a["forks../packages/react-server/src/ReactFlightServerConfig.js()"]
  5af38c85_b09a_551b_47c3_55b03ddf2a1b["forks.js"]
  a26b25c2_f491_acb5_0498_94a5b705d87a -->|defined in| 5af38c85_b09a_551b_47c3_55b03ddf2a1b
  a1e83dc6_a96e_1b90_c508_b73a227160ed["findNearestExistingForkFile()"]
  a26b25c2_f491_acb5_0498_94a5b705d87a -->|calls| a1e83dc6_a96e_1b90_c508_b73a227160ed
  style a26b25c2_f491_acb5_0498_94a5b705d87a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/rollup/forks.js lines 350–392

  './packages/react-server/src/ReactFlightServerConfig.js': (
    bundleType,
    entry,
    dependencies,
    moduleType
  ) => {
    if (dependencies.indexOf('react-server') !== -1) {
      return null;
    }
    if (moduleType !== RENDERER && moduleType !== RECONCILER) {
      return null;
    }
    // eslint-disable-next-line no-for-of-loops/no-for-of-loops
    for (let rendererInfo of inlinedHostConfigs) {
      if (rendererInfo.entryPoints.indexOf(entry) !== -1) {
        if (!rendererInfo.isServerSupported) {
          return null;
        }
        if (rendererInfo.isFlightSupported === false) {
          return new Error(
            `Expected not to use ReactFlightServerConfig with "${entry}" entry point ` +
              'in ./scripts/shared/inlinedHostConfigs.js. Update the renderer config to ' +
              'activate flight suppport and add a matching fork implementation for ReactFlightServerConfig.'
          );
        }
        const foundFork = findNearestExistingForkFile(
          './packages/react-server/src/forks/ReactFlightServerConfig.',
          rendererInfo.shortName,
          '.js'
        );
        if (foundFork) {
          return foundFork;
        }
        // fall through to error
        break;
      }
    }
    throw new Error(
      'Expected ReactFlightServerConfig to always be replaced with a shim, but ' +
        `found no mention of "${entry}" entry point in ./scripts/shared/inlinedHostConfigs.js. ` +
        'Did you mean to add it there to associate it with a specific renderer?'
    );
  },

Domain

Subdomains

Frequently Asked Questions

What does forks../packages/react-server/src/ReactFlightServerConfig.js() do?
forks../packages/react-server/src/ReactFlightServerConfig.js() is a function in the react codebase, defined in scripts/rollup/forks.js.
Where is forks../packages/react-server/src/ReactFlightServerConfig.js() defined?
forks../packages/react-server/src/ReactFlightServerConfig.js() is defined in scripts/rollup/forks.js at line 350.
What does forks../packages/react-server/src/ReactFlightServerConfig.js() call?
forks../packages/react-server/src/ReactFlightServerConfig.js() calls 1 function(s): findNearestExistingForkFile.

Analyze Your Own Codebase

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

Try Supermodel Free