| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | * |
| 7 | * @flow |
| 8 | */ |
| 9 | |
| 10 | import type {ModuleLoading} from './ReactFlightClientConfigBundlerParcel'; |
| 11 | import {preinitModuleForSSR} from 'react-client/src/ReactFlightClientConfig'; |
| 12 | |
| 13 | export function prepareDestinationWithChunks( |
| 14 | moduleLoading: ModuleLoading, |
| 15 | bundles: Array<string>, |
| 16 | nonce: ?string, |
| 17 | ) { |
| 18 | for (let i = 0; i < bundles.length; i++) { |
| 19 | preinitModuleForSSR(parcelRequire.meta.publicUrl + bundles[i], nonce); |
| 20 | } |
| 21 | } |