-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
React 19 SSR Fails In Production Mode, But Works In Development #11025
Comments
react renamed their symbol for elements, facebook/react#28813 bun's own transform for JSX does inlining in production: it seems for react 19 we will need to update or disable this |
Ah that makes more sense , so this change was causing Bun not to tag element's correctly? Thanks paperdave! |
Hello, is there any update on this? I can replicate it on v1.1.21. Thanks! |
I thought we had disabled the inlining but I guess we didn’t |
I do not think so, but I could be wrong! |
Is there anything I can do to help this along - digging into Bun internals might be a bit tricky for me but I'm willing to give it a shot! |
I encounter following error in nextjs. Same conditions, works in dev and fails in prod. Is it relevant here? |
Hello! Not sure if you have time to take a look at this @paperdave? |
What version of Bun is running?
1.1.8
What platform is your computer?
Darwin 23.4.0 arm64 arm
What steps can reproduce the bug?
How to recreate the error
What is the expected behavior?
The expected behavior is that in production mode , the react 19 application would successfully render with bun renderToReadableStream
What do you see instead?
Instead in production the hydration will fail
Additional information
One way to get the code working is to moneky patch the following code out
react-dom-server.bun.production.js
however by doing so styles will not load correctly when passing a style from the server
I got around this by passing the styles as a prop and using the
<style></style> tag in the component itself.Typically
would work in development mode
The text was updated successfully, but these errors were encountered: