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

[Fizz] Move /static build into /server builds #27327

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

sebmarkbage
Copy link
Collaborator

This joins the static (prerender) builds with the server builds but doesn't change the public entry points.

The idea of two separate bundles is that we'd have a specialized build for Fizz just for the prerender that could do a lot more. However, in practice the code is implemented with a dynamic check so it's in both. It's also not a lot of code.

At the same time if you do have a set up that includes both the prerender and the render in the same build output, this just doubles the server bundle size for no reason.

So we might as well merge them into one build. However, I don't expose the prerender from /server. Instead it's just exposed from the public /static entry point. This leaves us with the option to go back to separate builds later if it diverges more in the future.

This joins the static (prerender) builds with the server builds.
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Sep 1, 2023
@react-sizebot
Copy link

Comparing: 7022e8d...cec23f3

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 = 165.63 kB 165.63 kB = 51.88 kB 51.88 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 174.70 kB 174.70 kB = 54.61 kB 54.61 kB
facebook-www/ReactDOM-prod.classic.js = 570.44 kB 570.44 kB = 100.45 kB 100.45 kB
facebook-www/ReactDOM-prod.modern.js = 554.21 kB 554.21 kB = 97.61 kB 97.61 kB
oss-stable-semver/react-dom/static.browser.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.18 kB
oss-stable-semver/react-dom/static.edge.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.18 kB
oss-stable-semver/react-dom/static.js +∞% 0.00 kB 0.06 kB +∞% 0.00 kB 0.08 kB
oss-stable-semver/react-dom/static.node.js +∞% 0.00 kB 0.29 kB +∞% 0.00 kB 0.19 kB
oss-stable/react-dom/static.browser.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.18 kB
oss-stable/react-dom/static.edge.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.18 kB
oss-stable/react-dom/static.js +∞% 0.00 kB 0.06 kB +∞% 0.00 kB 0.08 kB
oss-stable/react-dom/static.node.js +∞% 0.00 kB 0.29 kB +∞% 0.00 kB 0.19 kB
oss-experimental/react-dom/static.node.js +30.63% 0.22 kB 0.29 kB +20.51% 0.16 kB 0.19 kB
oss-experimental/react-dom/static.edge.js +19.82% 0.22 kB 0.27 kB +14.10% 0.16 kB 0.18 kB
oss-experimental/react-dom/static.browser.js +19.30% 0.23 kB 0.27 kB +13.21% 0.16 kB 0.18 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.development.js Deleted 364.30 kB 0.00 kB Deleted 81.85 kB 0.00 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.production.min.js Deleted 66.73 kB 0.00 kB Deleted 20.64 kB 0.00 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.development.js Deleted 364.71 kB 0.00 kB Deleted 81.98 kB 0.00 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.production.min.js Deleted 67.05 kB 0.00 kB Deleted 20.76 kB 0.00 kB
oss-experimental/react-dom/cjs/react-dom-static.node.development.js Deleted 366.44 kB 0.00 kB Deleted 82.18 kB 0.00 kB
oss-experimental/react-dom/cjs/react-dom-static.node.production.min.js Deleted 71.39 kB 0.00 kB Deleted 22.22 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/react-dom/static.browser.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.18 kB
oss-stable-semver/react-dom/static.edge.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.18 kB
oss-stable-semver/react-dom/static.js +∞% 0.00 kB 0.06 kB +∞% 0.00 kB 0.08 kB
oss-stable-semver/react-dom/static.node.js +∞% 0.00 kB 0.29 kB +∞% 0.00 kB 0.19 kB
oss-stable/react-dom/static.browser.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.18 kB
oss-stable/react-dom/static.edge.js +∞% 0.00 kB 0.27 kB +∞% 0.00 kB 0.18 kB
oss-stable/react-dom/static.js +∞% 0.00 kB 0.06 kB +∞% 0.00 kB 0.08 kB
oss-stable/react-dom/static.node.js +∞% 0.00 kB 0.29 kB +∞% 0.00 kB 0.19 kB
oss-experimental/react-dom/static.node.js +30.63% 0.22 kB 0.29 kB +20.51% 0.16 kB 0.19 kB
oss-experimental/react-dom/static.edge.js +19.82% 0.22 kB 0.27 kB +14.10% 0.16 kB 0.18 kB
oss-experimental/react-dom/static.browser.js +19.30% 0.23 kB 0.27 kB +13.21% 0.16 kB 0.18 kB
oss-experimental/react-dom/cjs/react-dom-server.node.production.min.js +1.64% 71.81 kB 72.99 kB +1.07% 22.31 kB 22.55 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.production.min.js +1.46% 67.22 kB 68.21 kB +0.84% 20.71 kB 20.88 kB
oss-experimental/react-dom/umd/react-dom-server.browser.production.min.js +1.45% 67.36 kB 68.34 kB +0.80% 20.96 kB 21.13 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.production.min.js +1.39% 71.66 kB 72.66 kB +0.75% 22.21 kB 22.38 kB
oss-experimental/react-dom/cjs/react-dom-server.node.development.js +0.75% 367.19 kB 369.96 kB +0.66% 81.99 kB 82.54 kB
oss-experimental/react-dom/umd/react-dom-server.browser.development.js +0.66% 383.74 kB 386.27 kB +0.32% 82.82 kB 83.08 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.development.js +0.66% 366.25 kB 368.66 kB +0.32% 81.95 kB 82.21 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.development.js +0.66% 366.66 kB 369.07 kB +0.32% 82.08 kB 82.34 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.development.js Deleted 364.30 kB 0.00 kB Deleted 81.85 kB 0.00 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.production.min.js Deleted 66.73 kB 0.00 kB Deleted 20.64 kB 0.00 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.development.js Deleted 364.71 kB 0.00 kB Deleted 81.98 kB 0.00 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.production.min.js Deleted 67.05 kB 0.00 kB Deleted 20.76 kB 0.00 kB
oss-experimental/react-dom/cjs/react-dom-static.node.development.js Deleted 366.44 kB 0.00 kB Deleted 82.18 kB 0.00 kB
oss-experimental/react-dom/cjs/react-dom-static.node.production.min.js Deleted 71.39 kB 0.00 kB Deleted 22.22 kB 0.00 kB

Generated by 🚫 dangerJS against cec23f3

@sebmarkbage sebmarkbage merged commit 2c2bdd0 into facebook:main Sep 5, 2023
2 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 5, 2023
This joins the static (prerender) builds with the server builds but
doesn't change the public entry points.

The idea of two separate bundles is that we'd have a specialized build
for Fizz just for the prerender that could do a lot more. However, in
practice the code is implemented with a dynamic check so it's in both.
It's also not a lot of code.

At the same time if you do have a set up that includes both the
prerender and the render in the same build output, this just doubles the
server bundle size for no reason.

So we might as well merge them into one build. However, I don't expose
the `prerender` from `/server`. Instead it's just exposed from the
public `/static` entry point. This leaves us with the option to go back
to separate builds later if it diverges more in the future.

DiffTrain build for [2c2bdd0](2c2bdd0)
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
This joins the static (prerender) builds with the server builds but
doesn't change the public entry points.

The idea of two separate bundles is that we'd have a specialized build
for Fizz just for the prerender that could do a lot more. However, in
practice the code is implemented with a dynamic check so it's in both.
It's also not a lot of code.

At the same time if you do have a set up that includes both the
prerender and the render in the same build output, this just doubles the
server bundle size for no reason.

So we might as well merge them into one build. However, I don't expose
the `prerender` from `/server`. Instead it's just exposed from the
public `/static` entry point. This leaves us with the option to go back
to separate builds later if it diverges more in the future.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
This joins the static (prerender) builds with the server builds but
doesn't change the public entry points.

The idea of two separate bundles is that we'd have a specialized build
for Fizz just for the prerender that could do a lot more. However, in
practice the code is implemented with a dynamic check so it's in both.
It's also not a lot of code.

At the same time if you do have a set up that includes both the
prerender and the render in the same build output, this just doubles the
server bundle size for no reason.

So we might as well merge them into one build. However, I don't expose
the `prerender` from `/server`. Instead it's just exposed from the
public `/static` entry point. This leaves us with the option to go back
to separate builds later if it diverges more in the future.

DiffTrain build for commit 2c2bdd0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants