-
Notifications
You must be signed in to change notification settings - Fork 61
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
build: externalize react/jsx-runtime #69
base: main
Are you sure you want to change the base?
Conversation
Thanks! Will review it tomorrow. Have you tested it as a fix for 66? |
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.
yeah, great catch thanks
tbh no, had no time, but had this fixed for several other repos. you can verify the unecessary bundle here: You will see, it bundles the use of __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner e.g. in the dist of the package in npm The reason why it breaks is because __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED were changed in react 19, which leads to a problem and react version mismatch, because __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED is undefined, and nextjs15 is using react 19 rc therefore the error, which will automatically be resolved therefore, e.g. cal.com reduced bundle for the embed-react package from 20kb to 2kb with that |
I see, thank you very much. I will do some additional verification before merging shortly. |
Any news on this? |
Optimizes bundeling sizes, because at the moment react/jsx-runtime is being bundled unnecessary leading to a overhead in production, by externalizing react/jsx-runtime and also for the future react-dom/client
Would be awesome for having a quick merge, because no breaking change, no problem, just removes overhead, reduce bundle size, and also provides a fix.
Also fixes #66