dillon1000/react
Commit
Browse files Update Flight Fixture to "use client" instead of .client.js (#26118)
This updates the Flight fixture to support the new ESM loaders in newer versions of Node.js. It also uses native fetch since react-fetch is gone now. (This part requires Node 18 to run the fixture.) I also updated everything to use the `"use client"` convention instead of file name based convention. The biggest hack here is that the Webpack plugin now just writes every `.js` file in the manifest. This needs to be more scoped. In practice, this new convention effectively requires you to traverse the server graph first to find the actual used files. This is enough to at least run our own fixture though. I didn't update the "blocks" fixture. More details in each commit message.
Changed paths16 files
First-parent comparisonfixtures/flight-browser/index.html ModifiedM fixtures/flight/config/webpack.config.js ModifiedM fixtures/flight/loader/index.js ModifiedR fixtures/flight/server/cli.server.js →fixtures/flight/server/cli.js RenamedR fixtures/flight/server/handler.server.js →fixtures/flight/server/handler.js RenamedM fixtures/flight/server/package.json ModifiedR fixtures/flight/src/App.server.js →fixtures/flight/src/App.js RenamedR fixtures/flight/src/Counter.client.js →fixtures/flight/src/Counter.js RenamedD fixtures/flight/src/Counter2.client.js DeletedA fixtures/flight/src/Counter2.js AddedR fixtures/flight/src/ShowMore.client.js →fixtures/flight/src/ShowMore.js RenamedM packages/react-server-dom-webpack/src/ReactFlightWebpackNodeLoader.js ModifiedM packages/react-server-dom-webpack/src/ReactFlightWebpackNodeRegister.js ModifiedM packages/react-server-dom-webpack/src/ReactFlightWebpackPlugin.js ModifiedM packages/react-server-dom-webpack/src/__tests__/utils/WebpackMock.js ModifiedM scripts/rollup/bundles.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…