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

When aliasing react-dom to this package, react-apollo fails #2

Closed
kitze opened this issue Dec 14, 2018 · 6 comments
Closed

When aliasing react-dom to this package, react-apollo fails #2

kitze opened this issue Dec 14, 2018 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@kitze
Copy link

kitze commented Dec 14, 2018

When using the alias with react-app-rewired, react-apollo starts complaining that 'react-dom/server' cannot be resolved.

Any ideas what can be done?

Thanks

@theKashey
Copy link
Contributor

That's my bad - I didn't port "server", only client stuff

@theKashey theKashey added the bug Something isn't working label Dec 14, 2018
@theKashey theKashey self-assigned this Dec 14, 2018
theKashey added a commit that referenced this issue Dec 17, 2018
@theKashey
Copy link
Contributor

@hot-loader/react-dom@16.7.0-alpha.2.3 now is a full clone of react-dom, just a few things patched on the fly.

@jameswomack
Copy link

Can this issue be closed now?

@theKashey
Copy link
Contributor

👍

@bertho-zero
Copy link

image

I am using version 16.13.0 and I got this error during the webpack build.

I tried the alias Webpack but also Yarn, nothing helps, I am forced to remove the react-dom patch for now.

A require of react-dom works but not react-dom/server

@bertho-zero
Copy link

The problem comes from webpack aliases, making an alias for react-dom is not enough, that works fine:

'react-dom/server': require.resolve('@hot-loader/react-dom/server'),
'react-dom': require.resolve('@hot-loader/react-dom')

Order is important!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants