-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
fix: add react-server
condition for react/jsx-dev-runtime
#28921
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
himself65
changed the title
fix: react server condition for
fix: add Apr 26, 2024
react/jsx-dev-runtime
react-server
condition for react/jsx-dev-runtime
himself65
force-pushed
the
himself65/react-jsx-dev
branch
from
April 26, 2024 16:55
2027e6e
to
c90491d
Compare
himself65
force-pushed
the
himself65/react-jsx-dev
branch
from
April 26, 2024 21:17
c90491d
to
faf1bc6
Compare
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
Apr 27, 2024
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
Apr 27, 2024
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
Apr 27, 2024
eps1lon
approved these changes
Apr 27, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
eps1lon
reviewed
Apr 27, 2024
'use strict'; | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-jsx-dev-runtime.react-server.production.min.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just spotted this. We no longer ship minified so I'll need to follow-up on this one: #28939
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
Apr 28, 2024
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
Apr 29, 2024
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
Apr 29, 2024
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
Apr 30, 2024
dai-shi
added a commit
to dai-shi/waku
that referenced
this pull request
May 1, 2024
Closes: #671 Upstream: facebook/react#28921 --------- Co-authored-by: daishi <daishi@axlight.com>
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
May 2, 2024
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
May 2, 2024
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
May 3, 2024
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
May 6, 2024
eps1lon
added a commit
to vercel/next.js
that referenced
this pull request
May 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add
react-server
condition forreact/jsx-dev-runtime
to ensure they use the same internal in one node thread.In Waku RSC, we have a node worker under the
react-server
condition and use vite to parse the react component. in development mode, the jsx-dev was linked toReact.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
, which does not exist on the server side. So react@beta cause a runtime error and blocks waku from upgrading react version(dai-shi/waku#671).Related: #28217
/cc @dai-shi
How did you test this change?
Copy and paste into waku repo node_modules; not sure how to test React.