We are interested in building a react-server integration for Remix (and Vite). We've noticed a coupling between the React internals and the bundler API, and we’d like to propose a few small changes that would invert control to provide hooks that can be used by any flight runtime. As a result, all `react-server-dom-*` runtimes should be able to implement the touchpoints in a concise manner allowing the individual packages to focus on what to serialize for references, and how to deserialize/load references.
Today, each individual `react-server-dom-*` package (`react-server-dom-webpack`, `react-server-dom-turbopack`, etc.) essentially concatenates shared runtime modules with the entry points for that package. Each package implements a few functions that are opaquely called in the shared runtime source, including `resolveClientReferenceMetadata`, `resolveServerReference`, `preloadModule`, `requireModule`, etc.