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

Update rollup to v3 #26078

Closed
wants to merge 10 commits into from
Closed

Update rollup to v3 #26078

wants to merge 10 commits into from

Conversation

ymqy
Copy link
Contributor

@ymqy ymqy commented Jan 30, 2023

Summary

For the rollup upgrade, I may not be very confident that this can be done, for the configuration changes are only for the ci all through, but there are still some problems need to line up, why some build files deleted does not affect the ci results, ci execution results and local execution results are not consistent, see the following comments

Closes #26078

How did you test this change?

ci green

@ymqy
Copy link
Contributor Author

ymqy commented Jan 30, 2023

the bundle size has increased, there may be a problem there and it needs to be investigated.

@ymqy ymqy mentioned this pull request Jan 31, 2023
Copy link
Member

@kassens kassens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ymqy thanks for the PRs to bring some overdue updates! This PR is a huge and a difficult to review. I think you've already started separating some smallers parts of these changes into new PRs. I think this'll help a lot.

For example, I see jest related changes in this rollup PR. I think if we can separate them, it'll be a lot easier to review and merge! Thanks for the help!

@ymqy
Copy link
Contributor Author

ymqy commented Feb 1, 2023

Hey @ymqy thanks for the PRs to bring some overdue updates! This PR is a huge and a difficult to review. I think you've already started separating some smallers parts of these changes into new PRs. I think this'll help a lot.

For example, I see jest related changes in this rollup PR. I think if we can separate them, it'll be a lot easier to review and merge! Thanks for the help!

Thanks for the suggestion, I am preparing to split into smaller separate pr's to make review and merge easier

@ymqy
Copy link
Contributor Author

ymqy commented Feb 1, 2023

@kassens Before upgrading rollup, I need to upgrade jest. During the rollup upgrade process, I encountered that jest v26 does not support the 'node:' protocol, so I need to upgrade jest first. I split the jest upgrade into multiple smaller PRs. Now the CI has passed and is ready for review. After merging, I am planning to submit a PR for jest configuration optimization. #26088

@ymqy ymqy requested a review from kassens February 6, 2023 10:27
@ymqy
Copy link
Contributor Author

ymqy commented Feb 6, 2023

please review #26088

@eps1lon
Copy link
Collaborator

eps1lon commented Feb 9, 2023

@ymqy Would be awesome if you could rebase this PR. We still want to land this but updating build tooling needs extra care to not accidentally break releases.

@ymqy
Copy link
Contributor Author

ymqy commented Feb 10, 2023

@ymqy Would be awesome if you could rebase this PR. We still want to land this but updating build tooling needs extra care to not accidentally break releases.

Of course! I will take care of it shortly

@ymqy ymqy closed this Feb 11, 2023
@ymqy ymqy reopened this Feb 11, 2023
@@ -9,4 +9,4 @@

export * from 'react-client/src/ReactFlightClientHostConfigBrowser';
export * from 'react-client/src/ReactFlightClientHostConfigStream';
export * from 'react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig';
export * from 'react-server-dom-webpack/src/ReactFlightClientWebpackBundlerConfig.js';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the '.js' file extension to the import path to fix the ENOENT error. But it is not clear why the '.js' file extension is not added automatically

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These imports seem fragile to me and easy to mess. Why do we now need in some places the explicit .js suffix?

Does it have maybe something to do with this line below?

moduleSideEffects: id => !moduleSideEffects.includes(id),

where the id only matches if the .js exists? (Just a guess, I don't really understand the config 😄 )

babel({
presets: ['@babel/preset-react'],
sourceMap: true,
babelHelpers: 'bundled',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configure this option explicitly with its default value. https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers

@@ -10,7 +10,8 @@
import type {ReactNodeList} from 'shared/ReactTypes';
import type {BootstrapScriptDescriptor} from 'react-dom-bindings/src/server/ReactDOMServerFormatConfig';

import {Writable, Readable} from 'stream';
import type {Writable} from 'stream';
import {Readable} from 'stream';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix build error
image

@@ -185,7 +186,8 @@ function getRollupOutputOptions(
format,
globals,
freeze: !isProduction,
interop: false,
interop: 'default',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interop configuration uses the default values to minimize the size increase of the production bundles and pass the ci, and to be honest I'm not very confident about this change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From looking at the generated output files, I think this looks mostly right.

There's still a bit of extra code here (you can see the diffs in this comment #26078 (comment) )

Example larger build where the change is visible: https://react-builds.vercel.app/commits/cc7dbd62a503bf502eb911b82a28926cf4d177e9/files/oss-stable/react-debug-tools/cjs/react-debug-tools.development.js?compare=4a4ef2706cfb51db96d48fe20dadcb4fb8e3cb17

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this should be 'esModule' instead of 'default'

module => !importSideEffects[module]
);

const rollupConfig = {
input: resolvedEntry,
treeshake: {
pureExternalModules,
propertyReadSideEffects: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some code added to the production bundles that reads variables but doesn't use them, so I set propertyReadSideEffects to false to eliminate them

@ymqy
Copy link
Contributor Author

ymqy commented Feb 12, 2023

@eps1lon There are two other things that confuse me

  1. It is not clear why some files were deleted

  2. When building the output ReactDOMTesting-prod.js (fb_www_prod) file, errors are generated locally, but the ci passes3.

image

https://app.circleci.com/pipelines/github/facebook/react/38285/workflows/1f6fe9f0-341a-456b-bec6-590112285dd3/jobs/627405/parallel-runs/31?filterBy=ALL

image

@eps1lon
Copy link
Collaborator

eps1lon commented Feb 13, 2023

It is not clear why some files were deleted

No idea. I'd have to look through how the bundle configs are prepare to understand why some of them are missing now

When building the output ReactDOMTesting-prod.js (fb_www_prod) file, errors are generated locally, but the ci passes3.

Maybe a caching issue (have you tested this on a new clone?). Maybe a different environment than CI?

@ymqy ymqy closed this Feb 18, 2023
@ymqy ymqy reopened this Feb 18, 2023
@ymqy
Copy link
Contributor Author

ymqy commented Feb 18, 2023

Try again from the beginning.

@react-sizebot
Copy link

react-sizebot commented Feb 18, 2023

Comparing: 842bd78...4cb72d3

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 +0.17% 157.77 kB 158.04 kB +0.17% 50.28 kB 50.36 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.17% 159.36 kB 159.62 kB +0.18% 50.79 kB 50.88 kB
facebook-www/ReactDOM-prod.classic.js +0.14% 542.73 kB 543.51 kB +0.19% 96.62 kB 96.81 kB
facebook-www/ReactDOM-prod.modern.js +0.15% 526.47 kB 527.24 kB +0.20% 94.16 kB 94.35 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store.production.min.js +69.94% 0.35 kB 0.59 kB +58.47% 0.25 kB 0.39 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store.production.min.js +69.94% 0.35 kB 0.59 kB +58.47% 0.25 kB 0.39 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store.production.min.js +69.94% 0.35 kB 0.59 kB +58.47% 0.25 kB 0.39 kB
facebook-react-native/react/cjs/JSXRuntime-prod.js +38.19% 1.44 kB 1.99 kB +26.32% 0.68 kB 0.86 kB
facebook-react-native/react/cjs/JSXRuntime-profiling.js +38.19% 1.44 kB 1.99 kB +26.32% 0.68 kB 0.86 kB
oss-experimental/react-suspense-test-utils/cjs/react-suspense-test-utils.js +31.23% 0.78 kB 1.02 kB +25.74% 0.51 kB 0.64 kB
oss-stable-semver/react-suspense-test-utils/cjs/react-suspense-test-utils.js +31.23% 0.78 kB 1.02 kB +25.74% 0.51 kB 0.64 kB
oss-stable/react-suspense-test-utils/cjs/react-suspense-test-utils.js +31.23% 0.78 kB 1.02 kB +25.74% 0.51 kB 0.64 kB
oss-experimental/react/cjs/react-jsx-runtime.profiling.min.js +28.14% 0.86 kB 1.10 kB +21.22% 0.54 kB 0.66 kB
oss-stable-semver/react/cjs/react-jsx-runtime.profiling.min.js +28.14% 0.86 kB 1.10 kB +21.22% 0.54 kB 0.66 kB
oss-stable/react/cjs/react-jsx-runtime.profiling.min.js +28.14% 0.86 kB 1.10 kB +21.22% 0.54 kB 0.66 kB
oss-experimental/react/cjs/react-jsx-runtime.production.min.js +28.11% 0.86 kB 1.10 kB +20.99% 0.54 kB 0.66 kB
oss-stable-semver/react/cjs/react-jsx-runtime.production.min.js +28.11% 0.86 kB 1.10 kB +20.99% 0.54 kB 0.66 kB
oss-stable/react/cjs/react-jsx-runtime.production.min.js +28.11% 0.86 kB 1.10 kB +20.99% 0.54 kB 0.66 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.min.js +27.36% 0.90 kB 1.15 kB +22.94% 0.52 kB 0.64 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.min.js +27.36% 0.90 kB 1.15 kB +22.94% 0.52 kB 0.64 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.min.js +27.36% 0.90 kB 1.15 kB +22.94% 0.52 kB 0.64 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +23.59% 1.05 kB 1.29 kB +20.77% 0.57 kB 0.69 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +23.59% 1.05 kB 1.29 kB +20.77% 0.57 kB 0.69 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +23.59% 1.05 kB 1.29 kB +20.77% 0.57 kB 0.69 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +23.53% 1.11 kB 1.37 kB +21.06% 0.62 kB 0.75 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +23.53% 1.11 kB 1.37 kB +21.06% 0.62 kB 0.75 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +23.53% 1.11 kB 1.37 kB +21.06% 0.62 kB 0.75 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.min.js +22.79% 1.06 kB 1.30 kB +19.31% 0.61 kB 0.72 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.min.js +22.79% 1.06 kB 1.30 kB +19.31% 0.61 kB 0.72 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.min.js +22.79% 1.06 kB 1.30 kB +19.31% 0.61 kB 0.72 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store.development.js +17.65% 2.83 kB 3.33 kB +15.45% 1.27 kB 1.47 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store.development.js +17.65% 2.83 kB 3.33 kB +15.45% 1.27 kB 1.47 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store.development.js +17.65% 2.83 kB 3.33 kB +15.45% 1.27 kB 1.47 kB
oss-experimental/react-cache/cjs/react-cache.production.min.js +12.04% 2.17 kB 2.43 kB +12.57% 1.10 kB 1.24 kB
oss-stable-semver/react-cache/cjs/react-cache.production.min.js +12.04% 2.17 kB 2.43 kB +12.57% 1.10 kB 1.24 kB
oss-stable/react-cache/cjs/react-cache.production.min.js +12.04% 2.17 kB 2.43 kB +12.57% 1.10 kB 1.24 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +10.25% 5.85 kB 6.45 kB +10.22% 1.90 kB 2.09 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +10.25% 5.85 kB 6.45 kB +10.22% 1.90 kB 2.09 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +10.25% 5.85 kB 6.45 kB +10.22% 1.90 kB 2.09 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +9.20% 5.80 kB 6.33 kB +9.88% 1.88 kB 2.07 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +9.20% 5.80 kB 6.33 kB +9.88% 1.88 kB 2.07 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +9.20% 5.80 kB 6.33 kB +9.88% 1.88 kB 2.07 kB
oss-experimental/react-cache/cjs/react-cache.development.js +7.06% 8.64 kB 9.25 kB +6.67% 2.92 kB 3.12 kB
oss-stable-semver/react-cache/cjs/react-cache.development.js +7.06% 8.64 kB 9.25 kB +6.67% 2.92 kB 3.12 kB
oss-stable/react-cache/cjs/react-cache.development.js +7.06% 8.64 kB 9.25 kB +6.67% 2.92 kB 3.12 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +6.91% 7.87 kB 8.41 kB +6.22% 3.12 kB 3.31 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +6.91% 7.87 kB 8.41 kB +6.22% 3.12 kB 3.31 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +6.91% 7.87 kB 8.41 kB +6.22% 3.12 kB 3.31 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +6.43% 8.45 kB 9.00 kB +5.90% 3.22 kB 3.41 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +6.43% 8.45 kB 9.00 kB +5.90% 3.22 kB 3.41 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +6.43% 8.45 kB 9.00 kB +5.90% 3.22 kB 3.41 kB
facebook-www/ReactFlightDOMRelayClient-prod.classic.js +4.66% 12.17 kB 12.74 kB +5.20% 3.11 kB 3.28 kB
facebook-www/ReactFlightDOMRelayClient-prod.modern.js +4.66% 12.17 kB 12.74 kB +5.20% 3.11 kB 3.28 kB
facebook-relay/flight/ReactFlightNativeRelayClient-prod.js +4.66% 12.18 kB 12.74 kB +5.30% 3.11 kB 3.28 kB
oss-experimental/react-client/cjs/react-client-flight.production.min.js +4.08% 6.06 kB 6.30 kB +4.47% 2.40 kB 2.50 kB
oss-stable-semver/react-client/cjs/react-client-flight.production.min.js +4.08% 6.06 kB 6.30 kB +4.47% 2.40 kB 2.50 kB
oss-stable/react-client/cjs/react-client-flight.production.min.js +4.08% 6.06 kB 6.30 kB +4.47% 2.40 kB 2.50 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +3.89% 6.35 kB 6.60 kB +4.06% 2.53 kB 2.64 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +3.89% 6.35 kB 6.60 kB +4.06% 2.53 kB 2.64 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +3.89% 6.35 kB 6.60 kB +4.06% 2.53 kB 2.64 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +3.62% 6.80 kB 7.04 kB +3.50% 2.74 kB 2.84 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +3.62% 6.80 kB 7.04 kB +3.50% 2.74 kB 2.84 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +3.62% 6.80 kB 7.04 kB +3.50% 2.74 kB 2.84 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +3.59% 6.86 kB 7.11 kB +3.33% 2.79 kB 2.89 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +3.59% 6.86 kB 7.11 kB +3.33% 2.79 kB 2.89 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +3.59% 6.86 kB 7.11 kB +3.33% 2.79 kB 2.89 kB
oss-experimental/react-debug-tools/cjs/react-debug-tools.production.min.js +3.56% 6.79 kB 7.03 kB +4.02% 2.51 kB 2.61 kB
oss-stable-semver/react-debug-tools/cjs/react-debug-tools.production.min.js +3.56% 6.79 kB 7.03 kB +4.02% 2.51 kB 2.61 kB
oss-stable/react-debug-tools/cjs/react-debug-tools.production.min.js +3.56% 6.79 kB 7.03 kB +4.02% 2.51 kB 2.61 kB
facebook-www/ReactFlightDOMRelayClient-dev.classic.js +3.05% 19.86 kB 20.47 kB +3.51% 5.22 kB 5.40 kB
facebook-www/ReactFlightDOMRelayClient-dev.modern.js +3.05% 19.86 kB 20.47 kB +3.51% 5.22 kB 5.40 kB
facebook-relay/flight/ReactFlightNativeRelayClient-dev.js +3.04% 19.95 kB 20.55 kB +3.51% 5.24 kB 5.42 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +2.85% 8.69 kB 8.94 kB +2.64% 3.44 kB 3.54 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +2.85% 8.69 kB 8.94 kB +2.64% 3.44 kB 3.54 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +2.85% 8.69 kB 8.94 kB +2.64% 3.44 kB 3.54 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +2.79% 8.93 kB 9.18 kB +2.70% 3.55 kB 3.65 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +2.79% 8.93 kB 9.18 kB +2.70% 3.55 kB 3.65 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +2.79% 8.93 kB 9.18 kB +2.70% 3.55 kB 3.65 kB
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.development.js +2.63% 18.60 kB 19.09 kB +3.59% 5.34 kB 5.54 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.development.js +2.63% 18.60 kB 19.09 kB +3.59% 5.34 kB 5.54 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.development.js +2.63% 18.60 kB 19.09 kB +3.59% 5.34 kB 5.54 kB
oss-experimental/react-client/cjs/react-client-flight.development.js +2.21% 22.14 kB 22.62 kB +2.92% 5.90 kB 6.07 kB
oss-stable-semver/react-client/cjs/react-client-flight.development.js +2.21% 22.14 kB 22.62 kB +2.92% 5.90 kB 6.07 kB
oss-stable/react-client/cjs/react-client-flight.development.js +2.21% 22.14 kB 22.62 kB +2.92% 5.90 kB 6.07 kB
oss-experimental/react-debug-tools/cjs/react-debug-tools.development.js +2.16% 22.59 kB 23.08 kB +3.02% 6.02 kB 6.20 kB
oss-stable-semver/react-debug-tools/cjs/react-debug-tools.development.js +2.16% 22.59 kB 23.08 kB +3.02% 6.02 kB 6.20 kB
oss-stable/react-debug-tools/cjs/react-debug-tools.development.js +2.16% 22.59 kB 23.08 kB +3.02% 6.02 kB 6.20 kB
oss-experimental/react-dom/cjs/react-dom-test-utils.production.min.js +2.11% 12.64 kB 12.91 kB +2.09% 4.84 kB 4.94 kB
oss-stable-semver/react-dom/cjs/react-dom-test-utils.production.min.js +2.11% 12.64 kB 12.91 kB +2.09% 4.84 kB 4.94 kB
oss-stable/react-dom/cjs/react-dom-test-utils.production.min.js +2.11% 12.64 kB 12.91 kB +2.09% 4.84 kB 4.94 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2.08% 23.50 kB 23.99 kB +2.61% 6.18 kB 6.34 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2.08% 23.50 kB 23.99 kB +2.61% 6.18 kB 6.34 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2.08% 23.50 kB 23.99 kB +2.61% 6.18 kB 6.34 kB
oss-experimental/react-dom/umd/react-dom-test-utils.production.min.js +2.05% 12.76 kB 13.02 kB +2.24% 4.90 kB 5.01 kB
oss-stable-semver/react-dom/umd/react-dom-test-utils.production.min.js +2.05% 12.76 kB 13.02 kB +2.24% 4.90 kB 5.01 kB
oss-stable/react-dom/umd/react-dom-test-utils.production.min.js +2.05% 12.76 kB 13.02 kB +2.24% 4.90 kB 5.01 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js = 29.47 kB 28.71 kB = 10.09 kB 9.86 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js = 29.47 kB 28.71 kB = 10.09 kB 9.86 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js = 29.22 kB 28.47 kB = 9.99 kB 9.77 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js = 29.22 kB 28.47 kB = 9.99 kB 9.77 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js = 28.59 kB 27.83 kB = 9.81 kB 9.59 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js = 28.59 kB 27.83 kB = 9.81 kB 9.59 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js = 28.51 kB 27.76 kB = 9.80 kB 9.58 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js = 28.51 kB 27.76 kB = 9.80 kB 9.58 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js = 28.30 kB 27.55 kB = 9.70 kB 9.48 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js = 28.30 kB 27.55 kB = 9.70 kB 9.48 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js = 29.51 kB 28.71 kB = 10.11 kB 9.86 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js = 29.27 kB 28.47 kB = 10.01 kB 9.77 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js = 28.55 kB 27.76 kB = 9.82 kB 9.58 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js = 28.63 kB 27.83 kB = 9.83 kB 9.59 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js = 28.35 kB 27.55 kB = 9.73 kB 9.48 kB
facebook-www/ReactFlightDOMRelayServer-prod.classic.js = 37.45 kB 36.32 kB = 9.37 kB 9.10 kB
facebook-www/ReactFlightDOMRelayServer-prod.modern.js = 37.45 kB 36.32 kB = 9.37 kB 9.10 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js = 104.54 kB 100.34 kB = 25.41 kB 24.81 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js = 104.54 kB 100.34 kB = 25.41 kB 24.81 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js = 104.59 kB 100.34 kB = 25.43 kB 24.81 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js = 103.15 kB 98.95 kB = 25.02 kB 24.42 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js = 103.15 kB 98.95 kB = 25.02 kB 24.42 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js = 106.86 kB 102.52 kB = 25.19 kB 24.59 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js = 106.86 kB 102.52 kB = 25.19 kB 24.59 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js = 101.99 kB 97.80 kB = 25.05 kB 24.45 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js = 101.99 kB 97.80 kB = 25.05 kB 24.45 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js = 103.20 kB 98.95 kB = 25.04 kB 24.42 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js = 106.93 kB 102.52 kB = 25.21 kB 24.59 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js = 101.50 kB 97.31 kB = 24.90 kB 24.30 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js = 101.50 kB 97.31 kB = 24.90 kB 24.30 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js = 102.04 kB 97.80 kB = 25.07 kB 24.45 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js = 101.55 kB 97.31 kB = 24.92 kB 24.30 kB
facebook-www/ReactFlightDOMRelayServer-dev.modern.js = 75.62 kB 70.94 kB = 18.44 kB 17.73 kB
facebook-www/ReactFlightDOMRelayServer-dev.classic.js = 75.62 kB 70.94 kB = 18.44 kB 17.73 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/use-sync-external-store/cjs/use-sync-external-store.production.min.js +69.94% 0.35 kB 0.59 kB +58.47% 0.25 kB 0.39 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store.production.min.js +69.94% 0.35 kB 0.59 kB +58.47% 0.25 kB 0.39 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store.production.min.js +69.94% 0.35 kB 0.59 kB +58.47% 0.25 kB 0.39 kB
facebook-react-native/react/cjs/JSXRuntime-prod.js +38.19% 1.44 kB 1.99 kB +26.32% 0.68 kB 0.86 kB
facebook-react-native/react/cjs/JSXRuntime-profiling.js +38.19% 1.44 kB 1.99 kB +26.32% 0.68 kB 0.86 kB
oss-experimental/react-suspense-test-utils/cjs/react-suspense-test-utils.js +31.23% 0.78 kB 1.02 kB +25.74% 0.51 kB 0.64 kB
oss-stable-semver/react-suspense-test-utils/cjs/react-suspense-test-utils.js +31.23% 0.78 kB 1.02 kB +25.74% 0.51 kB 0.64 kB
oss-stable/react-suspense-test-utils/cjs/react-suspense-test-utils.js +31.23% 0.78 kB 1.02 kB +25.74% 0.51 kB 0.64 kB
oss-experimental/react/cjs/react-jsx-runtime.profiling.min.js +28.14% 0.86 kB 1.10 kB +21.22% 0.54 kB 0.66 kB
oss-stable-semver/react/cjs/react-jsx-runtime.profiling.min.js +28.14% 0.86 kB 1.10 kB +21.22% 0.54 kB 0.66 kB
oss-stable/react/cjs/react-jsx-runtime.profiling.min.js +28.14% 0.86 kB 1.10 kB +21.22% 0.54 kB 0.66 kB
oss-experimental/react/cjs/react-jsx-runtime.production.min.js +28.11% 0.86 kB 1.10 kB +20.99% 0.54 kB 0.66 kB
oss-stable-semver/react/cjs/react-jsx-runtime.production.min.js +28.11% 0.86 kB 1.10 kB +20.99% 0.54 kB 0.66 kB
oss-stable/react/cjs/react-jsx-runtime.production.min.js +28.11% 0.86 kB 1.10 kB +20.99% 0.54 kB 0.66 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.min.js +27.36% 0.90 kB 1.15 kB +22.94% 0.52 kB 0.64 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.min.js +27.36% 0.90 kB 1.15 kB +22.94% 0.52 kB 0.64 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.min.js +27.36% 0.90 kB 1.15 kB +22.94% 0.52 kB 0.64 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +23.59% 1.05 kB 1.29 kB +20.77% 0.57 kB 0.69 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +23.59% 1.05 kB 1.29 kB +20.77% 0.57 kB 0.69 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js +23.59% 1.05 kB 1.29 kB +20.77% 0.57 kB 0.69 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +23.53% 1.11 kB 1.37 kB +21.06% 0.62 kB 0.75 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +23.53% 1.11 kB 1.37 kB +21.06% 0.62 kB 0.75 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +23.53% 1.11 kB 1.37 kB +21.06% 0.62 kB 0.75 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.min.js +22.79% 1.06 kB 1.30 kB +19.31% 0.61 kB 0.72 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.min.js +22.79% 1.06 kB 1.30 kB +19.31% 0.61 kB 0.72 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.min.js +22.79% 1.06 kB 1.30 kB +19.31% 0.61 kB 0.72 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store.development.js +17.65% 2.83 kB 3.33 kB +15.45% 1.27 kB 1.47 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store.development.js +17.65% 2.83 kB 3.33 kB +15.45% 1.27 kB 1.47 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store.development.js +17.65% 2.83 kB 3.33 kB +15.45% 1.27 kB 1.47 kB
oss-experimental/react-cache/cjs/react-cache.production.min.js +12.04% 2.17 kB 2.43 kB +12.57% 1.10 kB 1.24 kB
oss-stable-semver/react-cache/cjs/react-cache.production.min.js +12.04% 2.17 kB 2.43 kB +12.57% 1.10 kB 1.24 kB
oss-stable/react-cache/cjs/react-cache.production.min.js +12.04% 2.17 kB 2.43 kB +12.57% 1.10 kB 1.24 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +10.25% 5.85 kB 6.45 kB +10.22% 1.90 kB 2.09 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +10.25% 5.85 kB 6.45 kB +10.22% 1.90 kB 2.09 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +10.25% 5.85 kB 6.45 kB +10.22% 1.90 kB 2.09 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +9.20% 5.80 kB 6.33 kB +9.88% 1.88 kB 2.07 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +9.20% 5.80 kB 6.33 kB +9.88% 1.88 kB 2.07 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +9.20% 5.80 kB 6.33 kB +9.88% 1.88 kB 2.07 kB
oss-experimental/react-cache/cjs/react-cache.development.js +7.06% 8.64 kB 9.25 kB +6.67% 2.92 kB 3.12 kB
oss-stable-semver/react-cache/cjs/react-cache.development.js +7.06% 8.64 kB 9.25 kB +6.67% 2.92 kB 3.12 kB
oss-stable/react-cache/cjs/react-cache.development.js +7.06% 8.64 kB 9.25 kB +6.67% 2.92 kB 3.12 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +6.91% 7.87 kB 8.41 kB +6.22% 3.12 kB 3.31 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +6.91% 7.87 kB 8.41 kB +6.22% 3.12 kB 3.31 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +6.91% 7.87 kB 8.41 kB +6.22% 3.12 kB 3.31 kB
oss-experimental/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +6.43% 8.45 kB 9.00 kB +5.90% 3.22 kB 3.41 kB
oss-stable-semver/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +6.43% 8.45 kB 9.00 kB +5.90% 3.22 kB 3.41 kB
oss-stable/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +6.43% 8.45 kB 9.00 kB +5.90% 3.22 kB 3.41 kB
facebook-www/ReactFlightDOMRelayClient-prod.classic.js +4.66% 12.17 kB 12.74 kB +5.20% 3.11 kB 3.28 kB
facebook-www/ReactFlightDOMRelayClient-prod.modern.js +4.66% 12.17 kB 12.74 kB +5.20% 3.11 kB 3.28 kB
facebook-relay/flight/ReactFlightNativeRelayClient-prod.js +4.66% 12.18 kB 12.74 kB +5.30% 3.11 kB 3.28 kB
oss-experimental/react-client/cjs/react-client-flight.production.min.js +4.08% 6.06 kB 6.30 kB +4.47% 2.40 kB 2.50 kB
oss-stable-semver/react-client/cjs/react-client-flight.production.min.js +4.08% 6.06 kB 6.30 kB +4.47% 2.40 kB 2.50 kB
oss-stable/react-client/cjs/react-client-flight.production.min.js +4.08% 6.06 kB 6.30 kB +4.47% 2.40 kB 2.50 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +3.89% 6.35 kB 6.60 kB +4.06% 2.53 kB 2.64 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +3.89% 6.35 kB 6.60 kB +4.06% 2.53 kB 2.64 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +3.89% 6.35 kB 6.60 kB +4.06% 2.53 kB 2.64 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +3.62% 6.80 kB 7.04 kB +3.50% 2.74 kB 2.84 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +3.62% 6.80 kB 7.04 kB +3.50% 2.74 kB 2.84 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +3.62% 6.80 kB 7.04 kB +3.50% 2.74 kB 2.84 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +3.59% 6.86 kB 7.11 kB +3.33% 2.79 kB 2.89 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +3.59% 6.86 kB 7.11 kB +3.33% 2.79 kB 2.89 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +3.59% 6.86 kB 7.11 kB +3.33% 2.79 kB 2.89 kB
oss-experimental/react-debug-tools/cjs/react-debug-tools.production.min.js +3.56% 6.79 kB 7.03 kB +4.02% 2.51 kB 2.61 kB
oss-stable-semver/react-debug-tools/cjs/react-debug-tools.production.min.js +3.56% 6.79 kB 7.03 kB +4.02% 2.51 kB 2.61 kB
oss-stable/react-debug-tools/cjs/react-debug-tools.production.min.js +3.56% 6.79 kB 7.03 kB +4.02% 2.51 kB 2.61 kB
facebook-www/ReactFlightDOMRelayClient-dev.classic.js +3.05% 19.86 kB 20.47 kB +3.51% 5.22 kB 5.40 kB
facebook-www/ReactFlightDOMRelayClient-dev.modern.js +3.05% 19.86 kB 20.47 kB +3.51% 5.22 kB 5.40 kB
facebook-relay/flight/ReactFlightNativeRelayClient-dev.js +3.04% 19.95 kB 20.55 kB +3.51% 5.24 kB 5.42 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +2.85% 8.69 kB 8.94 kB +2.64% 3.44 kB 3.54 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +2.85% 8.69 kB 8.94 kB +2.64% 3.44 kB 3.54 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +2.85% 8.69 kB 8.94 kB +2.64% 3.44 kB 3.54 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +2.79% 8.93 kB 9.18 kB +2.70% 3.55 kB 3.65 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +2.79% 8.93 kB 9.18 kB +2.70% 3.55 kB 3.65 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +2.79% 8.93 kB 9.18 kB +2.70% 3.55 kB 3.65 kB
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.development.js +2.63% 18.60 kB 19.09 kB +3.59% 5.34 kB 5.54 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.development.js +2.63% 18.60 kB 19.09 kB +3.59% 5.34 kB 5.54 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.development.js +2.63% 18.60 kB 19.09 kB +3.59% 5.34 kB 5.54 kB
oss-experimental/react-client/cjs/react-client-flight.development.js +2.21% 22.14 kB 22.62 kB +2.92% 5.90 kB 6.07 kB
oss-stable-semver/react-client/cjs/react-client-flight.development.js +2.21% 22.14 kB 22.62 kB +2.92% 5.90 kB 6.07 kB
oss-stable/react-client/cjs/react-client-flight.development.js +2.21% 22.14 kB 22.62 kB +2.92% 5.90 kB 6.07 kB
oss-experimental/react-debug-tools/cjs/react-debug-tools.development.js +2.16% 22.59 kB 23.08 kB +3.02% 6.02 kB 6.20 kB
oss-stable-semver/react-debug-tools/cjs/react-debug-tools.development.js +2.16% 22.59 kB 23.08 kB +3.02% 6.02 kB 6.20 kB
oss-stable/react-debug-tools/cjs/react-debug-tools.development.js +2.16% 22.59 kB 23.08 kB +3.02% 6.02 kB 6.20 kB
oss-experimental/react-dom/cjs/react-dom-test-utils.production.min.js +2.11% 12.64 kB 12.91 kB +2.09% 4.84 kB 4.94 kB
oss-stable-semver/react-dom/cjs/react-dom-test-utils.production.min.js +2.11% 12.64 kB 12.91 kB +2.09% 4.84 kB 4.94 kB
oss-stable/react-dom/cjs/react-dom-test-utils.production.min.js +2.11% 12.64 kB 12.91 kB +2.09% 4.84 kB 4.94 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2.08% 23.50 kB 23.99 kB +2.61% 6.18 kB 6.34 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2.08% 23.50 kB 23.99 kB +2.61% 6.18 kB 6.34 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2.08% 23.50 kB 23.99 kB +2.61% 6.18 kB 6.34 kB
oss-experimental/react-dom/umd/react-dom-test-utils.production.min.js +2.05% 12.76 kB 13.02 kB +2.24% 4.90 kB 5.01 kB
oss-stable-semver/react-dom/umd/react-dom-test-utils.production.min.js +2.05% 12.76 kB 13.02 kB +2.24% 4.90 kB 5.01 kB
oss-stable/react-dom/umd/react-dom-test-utils.production.min.js +2.05% 12.76 kB 13.02 kB +2.24% 4.90 kB 5.01 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +1.94% 25.15 kB 25.64 kB +2.47% 6.64 kB 6.80 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +1.94% 25.15 kB 25.64 kB +2.47% 6.64 kB 6.80 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +1.94% 25.15 kB 25.64 kB +2.47% 6.64 kB 6.80 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +1.93% 25.36 kB 25.85 kB +2.41% 6.72 kB 6.88 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +1.93% 25.36 kB 25.85 kB +2.41% 6.72 kB 6.88 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +1.93% 25.36 kB 25.85 kB +2.41% 6.72 kB 6.88 kB
facebook-relay/flight/ReactFlightNativeRelayServer-prod.js +1.77% 31.71 kB 32.27 kB +2.36% 7.49 kB 7.67 kB
facebook-www/ReactTestUtils-dev.classic.js +1.69% 47.86 kB 48.67 kB +1.65% 13.46 kB 13.68 kB
facebook-www/ReactTestUtils-dev.modern.js +1.69% 47.86 kB 48.67 kB +1.65% 13.46 kB 13.68 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.production.min.js +1.64% 15.16 kB 15.40 kB +2.70% 4.56 kB 4.68 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.production.min.js +1.64% 15.16 kB 15.40 kB +2.70% 4.56 kB 4.68 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.production.min.js +1.64% 15.16 kB 15.40 kB +2.70% 4.56 kB 4.68 kB
facebook-react-native/react/cjs/JSXDEVRuntime-dev.js +1.64% 36.94 kB 37.55 kB +1.65% 10.60 kB 10.78 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +1.64% 15.22 kB 15.47 kB +2.69% 4.58 kB 4.70 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +1.64% 15.22 kB 15.47 kB +2.69% 4.58 kB 4.70 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +1.64% 15.22 kB 15.47 kB +2.69% 4.58 kB 4.70 kB
facebook-react-native/react/cjs/JSXRuntime-dev.js +1.61% 37.54 kB 38.15 kB +1.63% 10.77 kB 10.95 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.development.js +1.58% 42.01 kB 42.68 kB +1.88% 9.43 kB 9.60 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.development.js +1.58% 42.01 kB 42.68 kB +1.88% 9.43 kB 9.60 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.development.js +1.58% 42.01 kB 42.68 kB +1.88% 9.43 kB 9.60 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +1.58% 42.15 kB 42.81 kB +1.89% 9.44 kB 9.62 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +1.58% 42.15 kB 42.81 kB +1.89% 9.44 kB 9.62 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +1.58% 42.15 kB 42.81 kB +1.89% 9.44 kB 9.62 kB
oss-experimental/react-server/cjs/react-server-flight.production.min.js +1.49% 16.61 kB 16.86 kB +1.96% 5.82 kB 5.94 kB
oss-stable-semver/react-server/cjs/react-server-flight.production.min.js +1.49% 16.61 kB 16.86 kB +1.96% 5.82 kB 5.94 kB
oss-stable/react-server/cjs/react-server-flight.production.min.js +1.49% 16.61 kB 16.86 kB +1.96% 5.82 kB 5.94 kB
facebook-www/JSXDEVRuntime-dev.modern.js +1.35% 44.81 kB 45.42 kB +1.35% 12.70 kB 12.87 kB
facebook-www/JSXDEVRuntime-dev.classic.js +1.35% 44.81 kB 45.42 kB +1.36% 12.70 kB 12.87 kB
oss-experimental/react-dom/cjs/react-dom-test-utils.development.js +1.19% 55.93 kB 56.59 kB +1.17% 16.24 kB 16.43 kB
oss-stable-semver/react-dom/cjs/react-dom-test-utils.development.js +1.19% 55.93 kB 56.59 kB +1.17% 16.24 kB 16.43 kB
oss-stable/react-dom/cjs/react-dom-test-utils.development.js +1.19% 55.93 kB 56.59 kB +1.17% 16.24 kB 16.43 kB
oss-experimental/react-dom/umd/react-dom-test-utils.development.js +1.18% 59.10 kB 59.80 kB +1.20% 16.49 kB 16.69 kB
oss-stable-semver/react-dom/umd/react-dom-test-utils.development.js +1.18% 59.10 kB 59.80 kB +1.20% 16.49 kB 16.69 kB
oss-stable/react-dom/umd/react-dom-test-utils.development.js +1.18% 59.10 kB 59.80 kB +1.20% 16.49 kB 16.69 kB
oss-experimental/react/cjs/react-jsx-dev-runtime.development.js +1.14% 42.84 kB 43.33 kB +1.24% 12.51 kB 12.66 kB
oss-stable-semver/react/cjs/react-jsx-dev-runtime.development.js +1.14% 42.86 kB 43.35 kB +1.24% 12.51 kB 12.67 kB
oss-stable/react/cjs/react-jsx-dev-runtime.development.js +1.14% 42.86 kB 43.35 kB +1.24% 12.51 kB 12.67 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +1.13% 46.10 kB 46.62 kB +1.41% 10.91 kB 11.07 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +1.13% 46.10 kB 46.62 kB +1.41% 10.91 kB 11.07 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +1.13% 46.10 kB 46.62 kB +1.41% 10.91 kB 11.07 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +1.13% 43.36 kB 43.85 kB +1.40% 10.74 kB 10.89 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +1.13% 43.36 kB 43.85 kB +1.40% 10.74 kB 10.89 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +1.13% 43.36 kB 43.85 kB +1.40% 10.74 kB 10.89 kB
oss-experimental/react/cjs/react-jsx-runtime.development.js +1.13% 43.44 kB 43.93 kB +1.23% 12.68 kB 12.84 kB
oss-stable-semver/react/cjs/react-jsx-runtime.development.js +1.13% 43.46 kB 43.95 kB +1.23% 12.68 kB 12.84 kB
oss-stable/react/cjs/react-jsx-runtime.development.js +1.13% 43.46 kB 43.95 kB +1.23% 12.68 kB 12.84 kB
oss-stable-semver/react-server/cjs/react-server.production.min.js +0.99% 24.49 kB 24.74 kB +1.43% 8.34 kB 8.46 kB
oss-stable/react-server/cjs/react-server.production.min.js +0.99% 24.49 kB 24.74 kB +1.43% 8.34 kB 8.46 kB
oss-experimental/react-server/cjs/react-server.production.min.js +0.98% 24.75 kB 24.99 kB +1.46% 8.43 kB 8.55 kB
facebook-relay/flight/ReactFlightNativeRelayServer-dev.js +0.97% 62.34 kB 62.95 kB +1.21% 15.13 kB 15.31 kB
oss-experimental/react-server/cjs/react-server-flight.development.js +0.75% 64.80 kB 65.29 kB +1.12% 15.57 kB 15.74 kB
oss-stable-semver/react-server/cjs/react-server-flight.development.js +0.75% 64.80 kB 65.29 kB +1.12% 15.57 kB 15.74 kB
oss-stable/react-server/cjs/react-server-flight.development.js +0.75% 64.80 kB 65.29 kB +1.12% 15.57 kB 15.74 kB
facebook-www/ReactDOMServer-prod.modern.js +0.50% 128.98 kB 129.63 kB +0.77% 24.31 kB 24.50 kB
facebook-www/ReactDOMServer-prod.classic.js +0.49% 132.55 kB 133.19 kB +0.75% 25.01 kB 25.19 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +0.48% 55.36 kB 55.63 kB +0.74% 16.43 kB 16.55 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +0.48% 55.38 kB 55.65 kB +0.73% 16.45 kB 16.57 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +0.48% 55.75 kB 56.02 kB +0.74% 16.58 kB 16.70 kB
facebook-www/ReactDOMServerStreaming-prod.modern.js +0.48% 133.92 kB 134.56 kB +0.74% 25.59 kB 25.78 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.production.min.js +0.48% 56.06 kB 56.33 kB +0.68% 17.30 kB 17.41 kB
oss-stable/react-dom/cjs/react-dom-server.browser.production.min.js +0.48% 56.08 kB 56.35 kB +0.68% 17.32 kB 17.44 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.production.min.js +0.48% 56.33 kB 56.60 kB +0.67% 17.40 kB 17.51 kB
oss-stable-semver/react-dom/umd/react-dom-server-legacy.browser.production.min.js +0.48% 55.51 kB 55.78 kB +0.62% 16.72 kB 16.82 kB
oss-stable/react-dom/umd/react-dom-server-legacy.browser.production.min.js +0.48% 55.54 kB 55.80 kB +0.63% 16.74 kB 16.85 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.production.min.js +0.47% 56.45 kB 56.72 kB +0.66% 17.45 kB 17.56 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.production.min.js +0.47% 56.51 kB 56.78 kB +0.68% 17.45 kB 17.57 kB
oss-experimental/react-dom/umd/react-dom-server-legacy.browser.production.min.js +0.47% 55.91 kB 56.17 kB +0.59% 16.88 kB 16.97 kB
oss-stable-semver/react-dom/umd/react-dom-server.browser.production.min.js +0.47% 56.21 kB 56.48 kB +0.64% 17.57 kB 17.69 kB
oss-stable/react-dom/umd/react-dom-server.browser.production.min.js +0.47% 56.24 kB 56.50 kB +0.63% 17.60 kB 17.71 kB
oss-experimental/react-dom/umd/react-dom-server.browser.production.min.js +0.47% 56.60 kB 56.87 kB +0.49% 17.71 kB 17.80 kB
oss-stable-semver/react-dom/cjs/react-dom-server.bun.production.min.js +0.45% 58.91 kB 59.17 kB +0.64% 17.85 kB 17.97 kB
oss-stable/react-dom/cjs/react-dom-server.bun.production.min.js +0.45% 58.93 kB 59.20 kB +0.65% 17.87 kB 17.99 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.production.min.js +0.45% 59.36 kB 59.63 kB +0.64% 18.04 kB 18.15 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.production.min.js +0.45% 60.01 kB 60.28 kB +0.63% 18.60 kB 18.72 kB
oss-stable/react-dom/cjs/react-dom-server.edge.production.min.js +0.45% 60.04 kB 60.31 kB +0.63% 18.62 kB 18.74 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.production.min.js +0.45% 59.93 kB 60.20 kB +0.63% 17.91 kB 18.02 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.production.min.js +0.45% 59.96 kB 60.22 kB +0.62% 17.93 kB 18.04 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.production.min.js +0.44% 60.47 kB 60.74 kB +0.64% 18.77 kB 18.89 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.production.min.js +0.44% 60.27 kB 60.54 kB +0.65% 18.66 kB 18.78 kB
oss-stable/react-dom/cjs/react-dom-server.node.production.min.js +0.44% 60.30 kB 60.57 kB +0.65% 18.68 kB 18.80 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.production.min.js +0.44% 60.39 kB 60.66 kB +0.68% 18.09 kB 18.21 kB
oss-experimental/react-dom/cjs/react-dom-static.node.production.min.js +0.44% 60.69 kB 60.96 kB +0.57% 18.82 kB 18.93 kB
oss-experimental/react-dom/cjs/react-dom-server.node.production.min.js +0.44% 60.73 kB 61.00 kB +0.59% 18.84 kB 18.95 kB
oss-stable-semver/react-server/cjs/react-server.development.js +0.34% 145.56 kB 146.05 kB +0.47% 36.30 kB 36.47 kB
oss-stable/react-server/cjs/react-server.development.js +0.34% 145.56 kB 146.05 kB +0.47% 36.30 kB 36.47 kB
oss-experimental/react-server/cjs/react-server.development.js +0.33% 146.21 kB 146.70 kB +0.46% 36.50 kB 36.67 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js +0.29% 293.38 kB 294.23 kB +0.41% 51.80 kB 52.01 kB
oss-stable-semver/react-art/cjs/react-art.production.min.js +0.29% 93.71 kB 93.97 kB +0.33% 28.75 kB 28.85 kB
oss-stable/react-art/cjs/react-art.production.min.js +0.29% 93.75 kB 94.02 kB +0.33% 28.78 kB 28.87 kB
oss-experimental/react-art/cjs/react-art.production.min.js +0.28% 95.26 kB 95.53 kB +0.38% 29.21 kB 29.32 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js +0.28% 309.11 kB 309.96 kB +0.40% 54.18 kB 54.40 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.production.min.js +0.27% 101.62 kB 101.90 kB +0.36% 31.11 kB 31.23 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.production.min.js +0.27% 101.67 kB 101.95 kB +0.36% 31.14 kB 31.25 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.production.min.js +0.27% 101.79 kB 102.07 kB +0.38% 31.17 kB 31.29 kB
oss-stable-semver/react-test-renderer/umd/react-test-renderer.production.min.js +0.27% 102.01 kB 102.28 kB +0.43% 31.52 kB 31.66 kB
oss-stable/react-test-renderer/umd/react-test-renderer.production.min.js +0.27% 102.06 kB 102.33 kB +0.42% 31.55 kB 31.68 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.production.min.js +0.27% 102.19 kB 102.46 kB +0.42% 31.58 kB 31.72 kB
react-native/implementations/ReactFabric-prod.fb.js +0.25% 327.71 kB 328.51 kB +0.32% 57.90 kB 58.09 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.production.min.js +0.24% 110.83 kB 111.09 kB +0.31% 33.64 kB 33.74 kB
oss-stable/react-reconciler/cjs/react-reconciler.production.min.js +0.24% 110.85 kB 111.12 kB +0.31% 33.66 kB 33.76 kB
react-native/implementations/ReactNativeRenderer-prod.fb.js +0.24% 334.15 kB 334.96 kB +0.33% 59.03 kB 59.22 kB
facebook-www/ReactART-prod.modern.js +0.24% 329.20 kB 329.99 kB +0.32% 55.84 kB 56.02 kB
oss-experimental/react-reconciler/cjs/react-reconciler.production.min.js +0.24% 112.35 kB 112.62 kB +0.29% 34.10 kB 34.20 kB
facebook-www/ReactART-prod.classic.js +0.23% 340.18 kB 340.97 kB +0.33% 57.74 kB 57.93 kB
react-native/implementations/ReactFabric-profiling.fb.js +0.23% 354.94 kB 355.76 kB +0.32% 62.10 kB 62.30 kB
react-native/implementations/ReactFabric-prod.js +0.23% 316.97 kB 317.70 kB +0.33% 55.91 kB 56.09 kB
react-native/implementations/ReactNativeRenderer-profiling.fb.js +0.23% 361.42 kB 362.24 kB +0.31% 63.26 kB 63.46 kB
react-native/implementations/ReactNativeRenderer-prod.js +0.22% 323.43 kB 324.15 kB +0.32% 56.96 kB 57.14 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.profiling.min.js +0.22% 119.82 kB 120.09 kB +0.28% 35.82 kB 35.92 kB
oss-stable/react-reconciler/cjs/react-reconciler.profiling.min.js +0.22% 119.84 kB 120.11 kB +0.28% 35.84 kB 35.95 kB
oss-experimental/react-reconciler/cjs/react-reconciler.profiling.min.js +0.22% 121.34 kB 121.61 kB +0.28% 36.31 kB 36.41 kB
react-native/implementations/ReactFabric-profiling.js +0.22% 336.36 kB 337.09 kB +0.31% 59.10 kB 59.28 kB
react-native/implementations/ReactNativeRenderer-profiling.js +0.21% 342.85 kB 343.59 kB +0.31% 60.20 kB 60.39 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js = 29.47 kB 28.71 kB = 10.09 kB 9.86 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js = 29.47 kB 28.71 kB = 10.09 kB 9.86 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js = 29.22 kB 28.47 kB = 9.99 kB 9.77 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js = 29.22 kB 28.47 kB = 9.99 kB 9.77 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js = 28.59 kB 27.83 kB = 9.81 kB 9.59 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js = 28.59 kB 27.83 kB = 9.81 kB 9.59 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js = 28.51 kB 27.76 kB = 9.80 kB 9.58 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js = 28.51 kB 27.76 kB = 9.80 kB 9.58 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js = 28.30 kB 27.55 kB = 9.70 kB 9.48 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js = 28.30 kB 27.55 kB = 9.70 kB 9.48 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js = 29.51 kB 28.71 kB = 10.11 kB 9.86 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js = 29.27 kB 28.47 kB = 10.01 kB 9.77 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js = 28.55 kB 27.76 kB = 9.82 kB 9.58 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js = 28.63 kB 27.83 kB = 9.83 kB 9.59 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js = 28.35 kB 27.55 kB = 9.73 kB 9.48 kB
facebook-www/ReactFlightDOMRelayServer-prod.classic.js = 37.45 kB 36.32 kB = 9.37 kB 9.10 kB
facebook-www/ReactFlightDOMRelayServer-prod.modern.js = 37.45 kB 36.32 kB = 9.37 kB 9.10 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js = 104.54 kB 100.34 kB = 25.41 kB 24.81 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js = 104.54 kB 100.34 kB = 25.41 kB 24.81 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js = 104.59 kB 100.34 kB = 25.43 kB 24.81 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js = 103.15 kB 98.95 kB = 25.02 kB 24.42 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js = 103.15 kB 98.95 kB = 25.02 kB 24.42 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js = 106.86 kB 102.52 kB = 25.19 kB 24.59 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js = 106.86 kB 102.52 kB = 25.19 kB 24.59 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js = 101.99 kB 97.80 kB = 25.05 kB 24.45 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js = 101.99 kB 97.80 kB = 25.05 kB 24.45 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js = 103.20 kB 98.95 kB = 25.04 kB 24.42 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js = 106.93 kB 102.52 kB = 25.21 kB 24.59 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js = 101.50 kB 97.31 kB = 24.90 kB 24.30 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js = 101.50 kB 97.31 kB = 24.90 kB 24.30 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js = 102.04 kB 97.80 kB = 25.07 kB 24.45 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js = 101.55 kB 97.31 kB = 24.92 kB 24.30 kB
facebook-www/ReactFlightDOMRelayServer-dev.modern.js = 75.62 kB 70.94 kB = 18.44 kB 17.73 kB
facebook-www/ReactFlightDOMRelayServer-dev.classic.js = 75.62 kB 70.94 kB = 18.44 kB 17.73 kB

Generated by 🚫 dangerJS against 4cb72d3

@ymqy ymqy closed this Feb 18, 2023
@ymqy ymqy reopened this Feb 21, 2023
@ymqy ymqy reopened this Feb 21, 2023
@markerikson
Copy link
Contributor

markerikson commented Mar 16, 2023

I've been playing around with a Rollup v3 upgrade on my own machine, and I've run into the same issues:

  • Need to change the interop flag (although I went with interop: 'esModule' and it seemed to work)
  • Need to fix imports from react-server over into react-server-dom-webpack/src to deal with file extensions

But, there's another issue I'm seeing locally, and I just checked and it's happening in this PR, too.

A noticeable chunk of DOM attribute handling is getting stripped out of the react-server-dom-webpack bundles. Here's a screenshot of the diff from one of the files in the size diffs earlier in this PR

image

That seems like a pretty broken change, and I'm not immediately sure what's causing it.

updates

Will jot down some notes as I play with this.

  1. It's definitely related to Rollup's tree-shaking. If I set treeshake: 'safest',, I see the missing DOM property logic get restored to the bundle.
  2. A-HA! By looking at the list of Rollup treeshaking preset options, I can see that the only difference between "recommended" and "safest" is that "safest" sets bothcorrectVarValueBeforeDeclaration and unknownGlobalSideEffects to true. If I add correctVarValueBeforeDeclaration: true to the existing Rollup config, I see those DOM property values get retained in the bundle.
  3. I just did a build of most of the bundles with those settings, and while the prod bundles are fine, a lot of the dev bundles have ballooned in size (react.development: 99K -> 107K, react-dom.development: 1200K -> 1360K)
  4. I think the current react-server-dom-webpack-server bundles are actually broken on main. The DOMProperty content does not have the properties object, and the PropertyInfoRecord instances are getting created and not assigned anywhere. That's why v3.0 is stripping a lot of those out even in dev builds - it's correctly (?) seeing that those aren't getting used at all, and they're no-ops.
  5. I wonder if some of this is related to transpiling with Babel at the individual file level? Maybe if we switch to transpiling the chunks instead, the tree shaking logic would look at those differently.
  6. I don't think that the stripUnusedImports plugin is needed any more. That was originally added in 2018 for the "Interaction Tracking" API in Interaction tracking follow up #13509 . I think that functionality got removed a couple years later in Remove unstable scheduler/tracing API #20037 . I tried commenting out that plugin on min and doing a test build, and it looks like no bundle contents meaningfully changed.
  7. I think I just fixed the react-dom-webpack-server + DOMProperty output bug! Per the example at Disable tree shaking on specified modules rollup/rollup#4090 (comment) , I added an extra Rollup plugin that specifically looks for the DOMProperty.js module and returns {code, map: null, moduleSideEffects: 'no-treeshake'}. I now see the property object and related usages in the react-server-dom-webpackbundles when building withmain` + Rollup 2.x + that tweak.
  8. Yes! With that 'no-treeshake' tweak in place, I can now do a Rollup 3.x build and see virtually identical build output to main

@markerikson
Copy link
Contributor

Per my above comment and #20186 (comment) , I've got a Rollup v3 upgrade seemingly working locally as part of an attempt to generate sourcemaps.

I discussed with Dan, and on Monday I'm going to file 3 separate PRs for fixing bugs in the current Rollup 2.x build config, upgrading to Rollup 3.x, and adding sourcemaps. That will supersede this PR, and I can work on getting those pushed through.

@ymqy : if you're around and available to finalize this PR in the next couple days, happy to use this one instead! I just need this wrapped up quickly so I can use it as the basis for the sourcemap generation.

@ymqy
Copy link
Contributor Author

ymqy commented Mar 19, 2023

@markerikson Thanks for the advice, I'll try to get as much done as possible.

@markerikson
Copy link
Contributor

@ymqy Sure! I think the main thing that's missing in this PR atm is the bugfix for the react-dom-webpack-server output. Not at my work computer atm, but the plugin I threw in was roughly this:

    {
        name: 'disable-treeshake',
        transform (code, id) {
            if (id.endsWith("DOMProperty.js") { 
                return {
                    code,
                    map: null,
                    moduleSideEffects: 'no-treeshake',
                };
            }
            return null;
        },
    }

@ymqy
Copy link
Contributor Author

ymqy commented Mar 19, 2023

@markerikson I have tried adding the disable-treeshake plugin and found that the react-dom-webpack-server build output still has problems, and have debugged the plugin to verify that the process is correct. Do I need to add correctVarValueBeforeDeclaration: true to the existing Rollup config? https://react-builds.vercel.app/commits/4cb72d38d6b52f98b0825ed93606be800497bc2a/files/oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js?compare=842bd787a55df9a93c4c6e0f9b003f100c564b5e

@markerikson
Copy link
Contributor

@ymqy : no, the output looked good for me without correctVarValueBeforeDeclaration. Busy for the next few hours, but let me grab the work laptop this afternoon and diff vs what you've got here.

@ymqy
Copy link
Contributor Author

ymqy commented Mar 20, 2023

@markerikson OK, feel free to @ me if you have any questions.

A noticeable chunk of DOM attribute handling is getting stripped out of the react-server-dom-webpack bundles.

I'm a bit confused, the problem is still there and the disable-treeshake plugin doesn't solve the problem.

@markerikson
Copy link
Contributor

@ymqy : ended up busy yesterday, but just fetched your branch and taking a look locally now. Will keep you posted on what I figure out!

@markerikson
Copy link
Contributor

@ymqy : huh. If I check out your branch and build, I do see the correct output (ie, the properties variable exists in the react-dom-server-webpack bundles, and I see properties[name] = new PropertyInfoRecord() being assigned).

Maybe the CI system is still reflecting an old artifact somehow?

The one other tweak I think ought to be made to this PR is changing from interop: 'default' to interop: 'esModule'. I compared the two, and it looks like 'default' is adding a small helper util that isn't in the Rollup 2.x-based bundles, doesn't seem to be needed as far as I can see.

@markerikson
Copy link
Contributor

@ymqy : try rebasing this against main and making that interop: 'esModule' tweak, and see if the combination of those gets better results in CI?

@markerikson
Copy link
Contributor

@ymqy : I filed my own Rollup v3 upgrade PR at #26442 , partly to see if the artifact diffs would come out better.

Good news is they did. But, then my PR's CI jobs failed because I was using interop: 'esModule', whereas yours uses interop: 'default', and that broke some react-noop-renderer behavior.

I spent several more hours trying out several config tweaks to see if I could get Rollup to leave out the import interop helpers and still have react-noop-renderer run cleanly, and I got it working.

I think that means #26442 is ready to be reviewed and merge at this point and would probably supersede this PR, but I specifically wanted to say that I based my changes on what you have here! In particular, the trick of changing the exports map to point to './src/*.js is a better solution than my first attempt of adding .js to a bunch of import statements. So, thank you for doing the initial work to get this upgrade rolling - it was very helpful!

@ymqy
Copy link
Contributor Author

ymqy commented Mar 21, 2023

@markerikson Thank you very much for coming up with a better solution to omit the import interop helpers, and for learning from the big guy's solution.

I am also new to contributing to open source and feel honoured to be recognised.

At first I just wanted to upgrade Rollup, but I ran into some problems and needed to upgrade jest first (#26088), during which I raised a pr (jestjs/jest#13795) for jest to support the migration from jasmine to jest-circus, and only after this work was done could I start the rollup upgrade, which was additional to the initial work 😂

@ymqy ymqy closed this Mar 21, 2023
@markerikson
Copy link
Contributor

@ymqy : hah, yeah, I totally understand that cascading series of "to fix tool X, I first have to update tool Y" problems :)

and yeah, I wanted to be clear that I'm not trying to come in and snatch away your chance to contribute here. Even if this PR doesn't get merged specifically, you did a lot of work to figure out what's needed for this upgrade, and I was able to build on top of your work. Really appreciate your efforts here!

@ymqy
Copy link
Contributor Author

ymqy commented Mar 21, 2023

@markerikson I hadn't thought of it that way, and I'm glad you're building on my work. Looking forward to seeing you get the sourcemap generation working!

@ymqy ymqy deleted the update-rollup branch March 21, 2023 05:54
gaearon pushed a commit that referenced this pull request Mar 24, 2023
<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn test --debug --watch TestName`,
open `chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

This PR:

- Updates Rollup from 2.x to latest 3.x, and updates associated plugins
- Updates deprecated / altered config settings in the Rollup plugin
pipeline
- Fixes some file extension and import issues related to use of ESM in
`react-dom-webpack-server`
- Removes a now-obsolete `strip-unused-imports` Rollup plugin
- <s>Fixes an _existing_ bug with the Rollup 2.x plugin pipeline on
`main` that was causing parts of `DOMProperty.js` to get left out of the
`react-dom-webpack-server` JS bundles, by adding a new plugin to tell
Rollup to treat that file as if it as side effects</s>

This PR should be functionally identical to the other existing "Rollup 3
upgrade" PR at #26078 . I'm filing this as a near-duplicate because I'm
ready to push this change through ASAP so that I can follow it up with a
PR that adds sourcemap support, that PR's artifact diffing seems like
it's possibly stuck and I want to compare the build results, and I've
got this set up against latest `main`.

<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->

This gets React's build setup updated to the latest Rollup version,
which is generally a good practice, but also ensures that any further
Rollup config tweaks can be done using the current Rollup docs as a
reference.

## How did you test this change?

<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
  If you leave this empty, your PR will very likely be closed.
-->

- Made builds from the latest `main`
- Updated Rollup package versions and cross-compared the changes I
needed to make locally to get successful builds vs #26078
- Diffed the output folders between `main` and this PR, and confirmed
that the bundle contents are identical (with the exception of version
strings and the `react-dom-webpack-server` bundle fix re-adding missing
`DOMProperty.js` content)
github-actions bot pushed a commit that referenced this pull request Mar 24, 2023
<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn test --debug --watch TestName`,
open `chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

This PR:

- Updates Rollup from 2.x to latest 3.x, and updates associated plugins
- Updates deprecated / altered config settings in the Rollup plugin
pipeline
- Fixes some file extension and import issues related to use of ESM in
`react-dom-webpack-server`
- Removes a now-obsolete `strip-unused-imports` Rollup plugin
- <s>Fixes an _existing_ bug with the Rollup 2.x plugin pipeline on
`main` that was causing parts of `DOMProperty.js` to get left out of the
`react-dom-webpack-server` JS bundles, by adding a new plugin to tell
Rollup to treat that file as if it as side effects</s>

This PR should be functionally identical to the other existing "Rollup 3
upgrade" PR at #26078 . I'm filing this as a near-duplicate because I'm
ready to push this change through ASAP so that I can follow it up with a
PR that adds sourcemap support, that PR's artifact diffing seems like
it's possibly stuck and I want to compare the build results, and I've
got this set up against latest `main`.

<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->

This gets React's build setup updated to the latest Rollup version,
which is generally a good practice, but also ensures that any further
Rollup config tweaks can be done using the current Rollup docs as a
reference.

## How did you test this change?

<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
  If you leave this empty, your PR will very likely be closed.
-->

- Made builds from the latest `main`
- Updated Rollup package versions and cross-compared the changes I
needed to make locally to get successful builds vs #26078
- Diffed the output folders between `main` and this PR, and confirmed
that the bundle contents are identical (with the exception of version
strings and the `react-dom-webpack-server` bundle fix re-adding missing
`DOMProperty.js` content)

DiffTrain build for [909c6da](909c6da)
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.

6 participants