You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 13, 2023. It is now read-only.
Remove top-level react-dom/server import to fix#2592.
Supersedes #2593.
Should fix#2592.
By pushing the react-dom/server import down into the relevant functions
that need it, we can avoid unconditionally importing that dependency tree,
which helps in environments like React Native where react-dom/server
either doesn't work or seems undesirable (see discussion in #2592).
Since the React Native bundler will still try to traverse the
require("react-dom/server") dependencies, it's important to prune that
dependency with a
"react-native": {
"react-dom/server": false
}
section in react-apollo/package.json. Note that this does not prevent
React Native apps from using getMarkupFromTree with an appropriate
renderFunction; it simply prevents React Native's bundler from bundling
the react-dom/server dependency just because react-apollo is imported.
Tested with both [email protected] and @0.57.7 (Expo SDKs 30 and 31).
0 commit comments