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

Export version from react-dom entry with react-server condition #29596

Merged
merged 1 commit into from
May 28, 2024

Conversation

unstubbable
Copy link
Collaborator

Summary

By exporting the version for this entry we can avoid this workaround in Next.js: https://github.com/vercel/next.js/blob/0f55f2ab1da5ee98b39316b4790734dd92ccc5bc/packages/next/src/server/future/route-modules/app-page/vendored/rsc/entrypoints.ts#L73-L79

How did you test this change?

I ran RELEASE_CHANNEL=stable node scripts/rollup/build.js --type=NODE_DEV and then inspected the contents of build/node_modules/react-dom/cjs/react-dom.react-server.development.js to verify that version is included in the exports.

Copy link

vercel bot commented May 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2024 10:49am

@react-sizebot
Copy link

Comparing: ea6e059...f69982c

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.js = 6.66 kB 6.66 kB +0.11% 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 496.04 kB 496.04 kB = 88.77 kB 88.77 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.67 kB 6.67 kB +0.11% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 500.84 kB 500.84 kB = 89.45 kB 89.46 kB
facebook-www/ReactDOM-prod.classic.js = 593.48 kB 593.48 kB = 104.38 kB 104.38 kB
facebook-www/ReactDOM-prod.modern.js = 569.87 kB 569.87 kB = 100.77 kB 100.77 kB
test_utils/ReactAllWarnings.js Deleted 63.82 kB 0.00 kB Deleted 15.95 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-experimental/react-dom/cjs/react-dom.react-server.production.js +1.26% 4.84 kB 4.90 kB +4.04% 1.24 kB 1.29 kB
oss-stable/react-dom/cjs/react-dom.react-server.production.js +1.05% 4.84 kB 4.89 kB +3.47% 1.24 kB 1.28 kB
oss-stable-semver/react-dom/cjs/react-dom.react-server.production.js +0.58% 4.84 kB 4.87 kB +1.37% 1.24 kB 1.26 kB
oss-experimental/react-dom/cjs/react-dom.react-server.development.js +0.55% 17.38 kB 17.48 kB +1.57% 3.88 kB 3.94 kB
oss-stable/react-dom/cjs/react-dom.react-server.development.js +0.49% 17.31 kB 17.40 kB +1.43% 3.85 kB 3.91 kB
oss-stable-semver/react-dom/cjs/react-dom.react-server.development.js +0.36% 17.31 kB 17.37 kB +0.75% 3.85 kB 3.88 kB
test_utils/ReactAllWarnings.js Deleted 63.82 kB 0.00 kB Deleted 15.95 kB 0.00 kB

Generated by 🚫 dangerJS against f69982c

@eps1lon
Copy link
Collaborator

eps1lon commented May 27, 2024

Especially important since the workaround in Next.js will hide version mismatches.

@eps1lon eps1lon requested a review from acdlite May 27, 2024 14:00
@eps1lon eps1lon merged commit 97722ca into facebook:main May 28, 2024
40 checks passed
nikeee pushed a commit to nikeee/react that referenced this pull request May 28, 2024
unstubbable added a commit to unstubbable/next.js that referenced this pull request Jun 6, 2024
eps1lon pushed a commit to vercel/next.js that referenced this pull request Jun 10, 2024
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