mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
dfb03e8559982eaf277b8fff7a3d83d96e85b1ea
Currently when we SSR a Flight response we do not emit any resources for module imports. This means that when the client hydrates it won't have already loaded the necessary scripts to satisfy the Imports defined in the Flight payload which will lead to a delay in hydration completing. This change updates `react-server-dom-webpack` and `react-server-dom-esm` to emit async script tags in the head when we encounter a modules in the flight response. To support this we need some additional server configuration. We need to know the path prefix for chunk loading and whether the chunks will load with CORS or not (and if so with what configuration). DiffTrain build for commit https://github.com/facebook/react/commit/701ac2e57290f913502c6012c15e815f412f84b7.
react-fbsource-import
Description
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%