dillon1000/react

Commit

Add a module map option to the Webpack Flight Client (#24629)

On the server we have a similar translation map from the file path that the
loader uses to the refer to the original module and to the bundled module ID.

The Flight server is optimized to emit the smallest format for the client.
However during SSR, the same client component might go by a different
module ID since it's a different bundle than the client bundle.

This provides an option to add a translation map from client ID to SSR ID
when reading the Flight stream.

Ideally we should have a special SSR Flight Client that takes this option
but for now we only have one Client for both.
Browse files
Changed paths10 files
First-parent comparison
M packages/react-client/src/ReactFlightClient.js ModifiedM packages/react-client/src/ReactFlightClientStream.js ModifiedM packages/react-client/src/forks/ReactFlightClientHostConfig.custom.js ModifiedM packages/react-noop-renderer/src/ReactNoopFlightClient.js ModifiedM packages/react-server-dom-relay/src/ReactFlightDOMRelayClientHostConfig.js ModifiedM packages/react-server-dom-relay/src/__tests__/ReactFlightDOMRelay-test.internal.js ModifiedM packages/react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js ModifiedM packages/react-server-dom-webpack/src/ReactFlightDOMClient.js ModifiedM packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMBrowser-test.js ModifiedM packages/react-server-native-relay/src/ReactFlightNativeRelayClientHostConfig.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…