jaydenseric / next-graphql-react

A graphql-react integration for Next.js.
https://npm.im/next-graphql-react
MIT License
77 stars 7 forks source link

Usage with Preact #6

Closed itsmitul closed 4 years ago

itsmitul commented 4 years ago

While using next-graphql-react on nextjs along with Preact, I am getting the following error:

UnhandledPromiseRejectionWarning: Error: Cannot find module 'react-dom/server.node'

jaydenseric commented 4 years ago

Probably because you need to alias this require path to whatever the Preact alternative is:

https://github.com/jaydenseric/graphql-react/blob/b427ed3b2f03773216aaa95e611f5f027be13138/src/server/ssr.js#L3

Closing because this issue is not specific to this particular repo, and also because Preact support for graphql-react was not a goal. Please share if you are able to get it working though; if there is anything easy we can do to better support Preact let us know!