Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite plugin for React Server Components #22952

Closed
wants to merge 94 commits into from
Closed

Conversation

frandiox
Copy link
Contributor

@frandiox frandiox commented Dec 14, 2021

Summary

Hi! This PR implements a Vite plugin for React Server Components. This is the approach we are currently exploring at @shopify/hydrogen and is extracted from here. Hydrogen is right now using a custom implementation of RSC but we would like to switch to the official implementation as soon as possible and make it work with SSR. This PR is meant to serve as a discussion to see what would be the best approach and some trade-offs.

Assumptions and constraints

As far as I understand, React 18 experimental supports server components by importing a "module reference" instead of actual client components in a Node process. This is done by using Node's native --conditions and registers/loaders. However, in order to do SSR we need the "real" client components in the process, not these module references. Therefore, it sounds like these two features are right now mutually exclusive unless we create 2 bundles or 2 different Node environments.

On the other hand, Vite typically runs on only 1 process and its philosophy is basically no-bundles in development to speed things up. Plus, the main build target for Hydrogen is Oxygen and Cloudflare Workers, which can't be run as 2 processes and don't have Node's native --conditions or registers.

Proposed approach

Instead of relying on Node flags or registers, the Vite plugin in this PR is wrapping every client component in a proxy that merges the component itself with its module reference in the same object. The React SSR renderer will treat this resulting object as a normal component whereas the RSC renderer will use it as a module reference. This way, it can run RSC and SSR in the same process without requiring multiple bundles or Node flags.

Implementation details and clarifications

  • The ClientProxy is basically wrapping components in ForwardRefs. The only reason to do this is so that the whole thing evaluates to typeof component === 'object' (instead of 'function') in order to reach this line in the RSC renderer. This could be simplified if we are willing to change the attemptResolveElement logic a bit. Also, this proxy could be removed if we only want to support RSC=>SSR (consuming RSC response in the server, then triggering SSR with that). It is needed, however, if we want to support running pure SSR without a prior RSC pass.
  • This does not use any manifest or "bundler config" because it relies on Vite's glob imports. These imports are injected around the __INJECTED_CLIENT_IMPORTERS__ object. Vite automatically adds a list of sub-dependencies to each of the client components so, when downloading a component during hydration, it gets all the sub-dependencies together to avoid waterfall requests.

Apart from implementation details that can be fixed or improved, would this be a valid approach in your opinion? Any other ideas that work with the constraints mentioned above?

There's a demo project using this implementation here (only RSC, not SSR): GitHub source | Stackblitz live demo

@sizebot
Copy link

sizebot commented Dec 14, 2021

Comparing: 1e5245d...e03c8cc

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 134.28 kB 134.28 kB = 42.94 kB 42.94 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 140.35 kB 140.35 kB = 44.74 kB 44.74 kB
facebook-www/ReactDOM-prod.classic.js = 474.44 kB 474.44 kB = 84.88 kB 84.88 kB
facebook-www/ReactDOM-prod.modern.js = 459.68 kB 459.68 kB = 82.62 kB 82.63 kB
facebook-www/ReactDOMForked-prod.classic.js = 474.44 kB 474.44 kB = 84.88 kB 84.88 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.62 kB +∞% 0.00 kB 7.02 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 66.27 kB +∞% 0.00 kB 17.21 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.58 kB +∞% 0.00 kB 6.57 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.development.server.js +∞% 0.00 kB 67.67 kB +∞% 0.00 kB 17.30 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.production.min.server.js +∞% 0.00 kB 18.00 kB +∞% 0.00 kB 6.65 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite.development.js +∞% 0.00 kB 16.37 kB +∞% 0.00 kB 4.85 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.13 kB +∞% 0.00 kB 1.88 kB
oss-experimental/react-server-dom-vite/esm/react-server-dom-vite-client-proxy.js +∞% 0.00 kB 2.99 kB +∞% 0.00 kB 1.25 kB
oss-experimental/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.63 kB +∞% 0.00 kB 7.03 kB
oss-experimental/react-server-dom-vite/esm/react-server-dom-vite-writer.browser.server.js +∞% 0.00 kB 66.18 kB +∞% 0.00 kB 17.16 kB
oss-experimental/react-server-dom-vite/esm/react-server-dom-vite-writer.node.server.js +∞% 0.00 kB 67.59 kB +∞% 0.00 kB 17.25 kB
oss-experimental/react-server-dom-vite/esm/react-server-dom-vite.js +∞% 0.00 kB 16.25 kB +∞% 0.00 kB 4.80 kB
oss-experimental/react-server-dom-vite/index.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-experimental/react-server-dom-vite/plugin.js +∞% 0.00 kB 0.08 kB +∞% 0.00 kB 0.10 kB
oss-experimental/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 69.67 kB +∞% 0.00 kB 17.44 kB
oss-experimental/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.76 kB +∞% 0.00 kB 6.60 kB
oss-experimental/react-server-dom-vite/umd/react-server-dom-vite.development.js +∞% 0.00 kB 17.61 kB +∞% 0.00 kB 4.97 kB
oss-experimental/react-server-dom-vite/umd/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.35 kB +∞% 0.00 kB 1.97 kB
oss-experimental/react-server-dom-vite/writer.browser.server.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.17 kB
oss-experimental/react-server-dom-vite/writer.node.server.js +∞% 0.00 kB 0.26 kB +∞% 0.00 kB 0.17 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.62 kB +∞% 0.00 kB 7.02 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 66.21 kB +∞% 0.00 kB 17.19 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.53 kB +∞% 0.00 kB 6.55 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.development.server.js +∞% 0.00 kB 67.62 kB +∞% 0.00 kB 17.28 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.production.min.server.js +∞% 0.00 kB 17.95 kB +∞% 0.00 kB 6.63 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite.development.js +∞% 0.00 kB 16.37 kB +∞% 0.00 kB 4.85 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.13 kB +∞% 0.00 kB 1.88 kB
oss-stable-semver/react-server-dom-vite/esm/react-server-dom-vite-client-proxy.js +∞% 0.00 kB 2.99 kB +∞% 0.00 kB 1.25 kB
oss-stable-semver/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.63 kB +∞% 0.00 kB 7.03 kB
oss-stable-semver/react-server-dom-vite/esm/react-server-dom-vite-writer.browser.server.js +∞% 0.00 kB 66.13 kB +∞% 0.00 kB 17.14 kB
oss-stable-semver/react-server-dom-vite/esm/react-server-dom-vite-writer.node.server.js +∞% 0.00 kB 67.53 kB +∞% 0.00 kB 17.24 kB
oss-stable-semver/react-server-dom-vite/esm/react-server-dom-vite.js +∞% 0.00 kB 16.25 kB +∞% 0.00 kB 4.80 kB
oss-stable-semver/react-server-dom-vite/index.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-stable-semver/react-server-dom-vite/plugin.js +∞% 0.00 kB 0.08 kB +∞% 0.00 kB 0.10 kB
oss-stable-semver/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 69.61 kB +∞% 0.00 kB 17.42 kB
oss-stable-semver/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.72 kB +∞% 0.00 kB 6.58 kB
oss-stable-semver/react-server-dom-vite/umd/react-server-dom-vite.development.js +∞% 0.00 kB 17.61 kB +∞% 0.00 kB 4.97 kB
oss-stable-semver/react-server-dom-vite/umd/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.35 kB +∞% 0.00 kB 1.97 kB
oss-stable-semver/react-server-dom-vite/writer.browser.server.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.17 kB
oss-stable-semver/react-server-dom-vite/writer.node.server.js +∞% 0.00 kB 0.26 kB +∞% 0.00 kB 0.17 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.62 kB +∞% 0.00 kB 7.02 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 66.21 kB +∞% 0.00 kB 17.19 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.53 kB +∞% 0.00 kB 6.55 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.development.server.js +∞% 0.00 kB 67.62 kB +∞% 0.00 kB 17.28 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.production.min.server.js +∞% 0.00 kB 17.95 kB +∞% 0.00 kB 6.63 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite.development.js +∞% 0.00 kB 16.37 kB +∞% 0.00 kB 4.85 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.13 kB +∞% 0.00 kB 1.88 kB
oss-stable/react-server-dom-vite/esm/react-server-dom-vite-client-proxy.js +∞% 0.00 kB 2.99 kB +∞% 0.00 kB 1.25 kB
oss-stable/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.63 kB +∞% 0.00 kB 7.03 kB
oss-stable/react-server-dom-vite/esm/react-server-dom-vite-writer.browser.server.js +∞% 0.00 kB 66.13 kB +∞% 0.00 kB 17.14 kB
oss-stable/react-server-dom-vite/esm/react-server-dom-vite-writer.node.server.js +∞% 0.00 kB 67.53 kB +∞% 0.00 kB 17.24 kB
oss-stable/react-server-dom-vite/esm/react-server-dom-vite.js +∞% 0.00 kB 16.25 kB +∞% 0.00 kB 4.80 kB
oss-stable/react-server-dom-vite/index.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-stable/react-server-dom-vite/plugin.js +∞% 0.00 kB 0.08 kB +∞% 0.00 kB 0.10 kB
oss-stable/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 69.61 kB +∞% 0.00 kB 17.42 kB
oss-stable/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.72 kB +∞% 0.00 kB 6.58 kB
oss-stable/react-server-dom-vite/umd/react-server-dom-vite.development.js +∞% 0.00 kB 17.61 kB +∞% 0.00 kB 4.97 kB
oss-stable/react-server-dom-vite/umd/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.35 kB +∞% 0.00 kB 1.97 kB
oss-stable/react-server-dom-vite/writer.browser.server.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.17 kB
oss-stable/react-server-dom-vite/writer.node.server.js +∞% 0.00 kB 0.26 kB +∞% 0.00 kB 0.17 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.62 kB +∞% 0.00 kB 7.02 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 66.27 kB +∞% 0.00 kB 17.21 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.58 kB +∞% 0.00 kB 6.57 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.development.server.js +∞% 0.00 kB 67.67 kB +∞% 0.00 kB 17.30 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.production.min.server.js +∞% 0.00 kB 18.00 kB +∞% 0.00 kB 6.65 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite.development.js +∞% 0.00 kB 16.37 kB +∞% 0.00 kB 4.85 kB
oss-experimental/react-server-dom-vite/cjs/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.13 kB +∞% 0.00 kB 1.88 kB
oss-experimental/react-server-dom-vite/esm/react-server-dom-vite-client-proxy.js +∞% 0.00 kB 2.99 kB +∞% 0.00 kB 1.25 kB
oss-experimental/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.63 kB +∞% 0.00 kB 7.03 kB
oss-experimental/react-server-dom-vite/esm/react-server-dom-vite-writer.browser.server.js +∞% 0.00 kB 66.18 kB +∞% 0.00 kB 17.16 kB
oss-experimental/react-server-dom-vite/esm/react-server-dom-vite-writer.node.server.js +∞% 0.00 kB 67.59 kB +∞% 0.00 kB 17.25 kB
oss-experimental/react-server-dom-vite/esm/react-server-dom-vite.js +∞% 0.00 kB 16.25 kB +∞% 0.00 kB 4.80 kB
oss-experimental/react-server-dom-vite/index.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-experimental/react-server-dom-vite/plugin.js +∞% 0.00 kB 0.08 kB +∞% 0.00 kB 0.10 kB
oss-experimental/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 69.67 kB +∞% 0.00 kB 17.44 kB
oss-experimental/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.76 kB +∞% 0.00 kB 6.60 kB
oss-experimental/react-server-dom-vite/umd/react-server-dom-vite.development.js +∞% 0.00 kB 17.61 kB +∞% 0.00 kB 4.97 kB
oss-experimental/react-server-dom-vite/umd/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.35 kB +∞% 0.00 kB 1.97 kB
oss-experimental/react-server-dom-vite/writer.browser.server.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.17 kB
oss-experimental/react-server-dom-vite/writer.node.server.js +∞% 0.00 kB 0.26 kB +∞% 0.00 kB 0.17 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.62 kB +∞% 0.00 kB 7.02 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 66.21 kB +∞% 0.00 kB 17.19 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.53 kB +∞% 0.00 kB 6.55 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.development.server.js +∞% 0.00 kB 67.62 kB +∞% 0.00 kB 17.28 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.production.min.server.js +∞% 0.00 kB 17.95 kB +∞% 0.00 kB 6.63 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite.development.js +∞% 0.00 kB 16.37 kB +∞% 0.00 kB 4.85 kB
oss-stable-semver/react-server-dom-vite/cjs/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.13 kB +∞% 0.00 kB 1.88 kB
oss-stable-semver/react-server-dom-vite/esm/react-server-dom-vite-client-proxy.js +∞% 0.00 kB 2.99 kB +∞% 0.00 kB 1.25 kB
oss-stable-semver/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.63 kB +∞% 0.00 kB 7.03 kB
oss-stable-semver/react-server-dom-vite/esm/react-server-dom-vite-writer.browser.server.js +∞% 0.00 kB 66.13 kB +∞% 0.00 kB 17.14 kB
oss-stable-semver/react-server-dom-vite/esm/react-server-dom-vite-writer.node.server.js +∞% 0.00 kB 67.53 kB +∞% 0.00 kB 17.24 kB
oss-stable-semver/react-server-dom-vite/esm/react-server-dom-vite.js +∞% 0.00 kB 16.25 kB +∞% 0.00 kB 4.80 kB
oss-stable-semver/react-server-dom-vite/index.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-stable-semver/react-server-dom-vite/plugin.js +∞% 0.00 kB 0.08 kB +∞% 0.00 kB 0.10 kB
oss-stable-semver/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 69.61 kB +∞% 0.00 kB 17.42 kB
oss-stable-semver/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.72 kB +∞% 0.00 kB 6.58 kB
oss-stable-semver/react-server-dom-vite/umd/react-server-dom-vite.development.js +∞% 0.00 kB 17.61 kB +∞% 0.00 kB 4.97 kB
oss-stable-semver/react-server-dom-vite/umd/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.35 kB +∞% 0.00 kB 1.97 kB
oss-stable-semver/react-server-dom-vite/writer.browser.server.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.17 kB
oss-stable-semver/react-server-dom-vite/writer.node.server.js +∞% 0.00 kB 0.26 kB +∞% 0.00 kB 0.17 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.62 kB +∞% 0.00 kB 7.02 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 66.21 kB +∞% 0.00 kB 17.19 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.53 kB +∞% 0.00 kB 6.55 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.development.server.js +∞% 0.00 kB 67.62 kB +∞% 0.00 kB 17.28 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite-writer.node.production.min.server.js +∞% 0.00 kB 17.95 kB +∞% 0.00 kB 6.63 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite.development.js +∞% 0.00 kB 16.37 kB +∞% 0.00 kB 4.85 kB
oss-stable/react-server-dom-vite/cjs/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.13 kB +∞% 0.00 kB 1.88 kB
oss-stable/react-server-dom-vite/esm/react-server-dom-vite-client-proxy.js +∞% 0.00 kB 2.99 kB +∞% 0.00 kB 1.25 kB
oss-stable/react-server-dom-vite/esm/react-server-dom-vite-plugin.js +∞% 0.00 kB 21.63 kB +∞% 0.00 kB 7.03 kB
oss-stable/react-server-dom-vite/esm/react-server-dom-vite-writer.browser.server.js +∞% 0.00 kB 66.13 kB +∞% 0.00 kB 17.14 kB
oss-stable/react-server-dom-vite/esm/react-server-dom-vite-writer.node.server.js +∞% 0.00 kB 67.53 kB +∞% 0.00 kB 17.24 kB
oss-stable/react-server-dom-vite/esm/react-server-dom-vite.js +∞% 0.00 kB 16.25 kB +∞% 0.00 kB 4.80 kB
oss-stable/react-server-dom-vite/index.js +∞% 0.00 kB 0.22 kB +∞% 0.00 kB 0.16 kB
oss-stable/react-server-dom-vite/plugin.js +∞% 0.00 kB 0.08 kB +∞% 0.00 kB 0.10 kB
oss-stable/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.development.server.js +∞% 0.00 kB 69.61 kB +∞% 0.00 kB 17.42 kB
oss-stable/react-server-dom-vite/umd/react-server-dom-vite-writer.browser.production.min.server.js +∞% 0.00 kB 17.72 kB +∞% 0.00 kB 6.58 kB
oss-stable/react-server-dom-vite/umd/react-server-dom-vite.development.js +∞% 0.00 kB 17.61 kB +∞% 0.00 kB 4.97 kB
oss-stable/react-server-dom-vite/umd/react-server-dom-vite.production.min.js +∞% 0.00 kB 4.35 kB +∞% 0.00 kB 1.97 kB
oss-stable/react-server-dom-vite/writer.browser.server.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.17 kB
oss-stable/react-server-dom-vite/writer.node.server.js +∞% 0.00 kB 0.26 kB +∞% 0.00 kB 0.17 kB
facebook-relay/flight/ReactFlightNativeRelayServer-prod.js +0.65% 22.03 kB 22.17 kB +0.18% 5.48 kB 5.49 kB
facebook-www/ReactFlightDOMRelayServer-prod.classic.js +0.51% 27.84 kB 27.98 kB +0.15% 7.34 kB 7.35 kB
facebook-www/ReactFlightDOMRelayServer-prod.modern.js +0.51% 27.91 kB 28.06 kB +0.14% 7.37 kB 7.38 kB
facebook-relay/flight/ReactFlightNativeRelayServer-dev.js +0.50% 40.00 kB 40.20 kB +0.15% 10.28 kB 10.30 kB
oss-experimental/react-server/cjs/react-server-flight.development.js +0.49% 41.09 kB 41.29 kB +0.08% 10.47 kB 10.48 kB
oss-stable-semver/react-server/cjs/react-server-flight.development.js +0.49% 41.09 kB 41.29 kB +0.08% 10.47 kB 10.48 kB
oss-stable/react-server/cjs/react-server-flight.development.js +0.49% 41.09 kB 41.29 kB +0.08% 10.47 kB 10.48 kB
facebook-www/ReactFlightDOMRelayServer-dev.classic.js +0.37% 54.70 kB 54.90 kB +0.09% 14.00 kB 14.01 kB
facebook-www/ReactFlightDOMRelayServer-dev.modern.js +0.37% 54.76 kB 54.96 kB +0.06% 14.02 kB 14.02 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.browser.development.server.js +0.31% 65.28 kB 65.48 kB +0.07% 16.92 kB 16.93 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.browser.development.server.js +0.31% 65.28 kB 65.48 kB +0.07% 16.92 kB 16.93 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.browser.development.server.js +0.31% 65.33 kB 65.53 kB +0.06% 16.94 kB 16.95 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-writer.browser.development.server.js +0.30% 68.63 kB 68.84 kB +0.06% 17.15 kB 17.16 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-writer.browser.development.server.js +0.30% 68.63 kB 68.84 kB +0.06% 17.15 kB 17.16 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.node.development.server.js +0.30% 66.68 kB 66.88 kB +0.08% 17.01 kB 17.03 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.node.development.server.js +0.30% 66.68 kB 66.88 kB +0.08% 17.01 kB 17.03 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-writer.browser.development.server.js +0.30% 68.69 kB 68.90 kB +0.06% 17.17 kB 17.18 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.node.development.server.js +0.30% 66.74 kB 66.94 kB +0.07% 17.03 kB 17.04 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.browser.production.min.server.js +0.22% 17.11 kB 17.15 kB +0.09% 6.40 kB 6.41 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.browser.production.min.server.js +0.22% 17.11 kB 17.15 kB +0.09% 6.40 kB 6.41 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.browser.production.min.server.js +0.22% 17.16 kB 17.19 kB +0.11% 6.42 kB 6.43 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-writer.browser.production.min.server.js +0.21% 17.30 kB 17.33 kB +0.14% 6.44 kB 6.44 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-writer.browser.production.min.server.js +0.21% 17.30 kB 17.33 kB +0.14% 6.44 kB 6.44 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-writer.browser.production.min.server.js +0.21% 17.34 kB 17.38 kB +0.17% 6.46 kB 6.47 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.node.production.min.server.js +0.21% 17.53 kB 17.57 kB +0.09% 6.49 kB 6.49 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.node.production.min.server.js +0.21% 17.53 kB 17.57 kB +0.09% 6.49 kB 6.49 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-writer.node.production.min.server.js +0.21% 17.58 kB 17.61 kB +0.09% 6.51 kB 6.52 kB

Generated by 🚫 dangerJS against e03c8cc

@facebook-github-bot
Copy link

Hi @frandiox!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@natew
Copy link

natew commented Aug 14, 2022

What do you think it'd take to get ServerContext working, I tested react@experimental in Hydrogen but I get things like Unexpected pop. and Unexpected Fiber popped. Just curious if that's coming from this plugin or maybe just caught some experimental issue on the version I tried.

@frandiox
Copy link
Contributor Author

@natew I just updated this plugin with the latest changes in upstream. Not sure if it will fix your issues, though, but you can give it a try. Other than that, I think there's not much to do in this plugin about Server Context 🤔

@frandiox
Copy link
Contributor Author

Closing this since it's outdated and there's a new approach following the latest conventions in #26926

@frandiox frandiox closed this Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants