react/fixtures/flight/config
Sebastian Markbåge 67a61d5bd7
[Flight Fixture] Show SSR Support with CSS (#26263)
Builds on #26257.

To do this we need access to a manifest for which scripts and CSS are
used for each "page" (entrypoint).

The initial script to bootstrap the app is inserted with
`bootstrapScripts`. Subsequent content are loaded using the chunks
mechanism built-in.

The stylesheets for each pages are prepended to each RSC payload and
rendered using Float. This doesn't yet support styles imported in
components that are also SSR:ed nor imported through Server Components.
That's more complex and not implemented in the node loader.

HMR doesn't work after reloads right now because the SSR renderer isn't
hot reloaded because there's no idiomatic way to hot reload ESM modules
in Node.js yet. Without killing the HMR server. This leads to hydration
mismatches when reloading the page after a hot reload.

Notably this doesn't show serializing the stream through the HTML like
real implementations do. This will lead to possible hydration mismatches
based on the data. However, manually serializing the stream as a string
isn't exactly correct due to binary data. It's not the idiomatic way
this is supposed to work. This will all be built-in which will make this
automatic in the future.
2023-02-28 19:44:37 -05:00
..
jest Update fixtures/flight to webpack 5 (#25115) 2022-08-23 21:18:05 -04:00
env.js Update fixtures/flight to webpack 5 (#25115) 2022-08-23 21:18:05 -04:00
modules.js Move Flight Fixture to use Middleware instead of WebDevServer (#26246) 2023-02-25 12:10:39 -05:00
package.json Support ESM module loaders in Flight fixture (#20229) 2020-11-12 08:11:05 -08:00
paths.js [Flight Fixture] Show SSR Support with CSS (#26263) 2023-02-28 19:44:37 -05:00
webpack.config.js [Flight Fixture] Show SSR Support with CSS (#26263) 2023-02-28 19:44:37 -05:00