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

Make import of ReactDOMServer work with React 18 #66

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fsoikin
Copy link
Contributor

@fsoikin fsoikin commented Dec 4, 2022

Importing react-dom/server.js works with React 16 and 17, but for some reason fails with React 18. esbuild reports that "react-dom does not export server.js".

@laurentpayot
Copy link

laurentpayot commented Nov 14, 2023

Hi @fsoikin, any news?

Just brainstorming for the error cause:

  • Could the error come from the fact that React 18 is incompatible with React 17 and in build.yml we have versions below 18?
  build:
    strategy:
      matrix:
        react-version: [16, 17, 18]
  • By the way is there a typo (missing t) in the esbuild error message you reported?

esbuild reports that "reac-dom does not export server.js".

@fsoikin
Copy link
Contributor Author

fsoikin commented Nov 14, 2023

No, I haven't had much time to work on this one. It's not required for my current day job, so I can't justify spending too much effort.

React 18 is sure incompatible with 17, but I don't see how that makes any difference here. We're not trying to use them side by side, only swap one for the other.

React 18 seems to have a slightly different module organization, which doesn't allow the same code to import both server-side and client-side modules, but I haven't really investigated in depth.

If you have any ideas and free time, feel free to try this yourself, I will very much appreciate a contribution.

(and yes, that's a typo; fixed; but it's not the exact error message, I was just paraphrasing anyway)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants