-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
SSR support #7
Comments
@emilwidlund there's a bigger change needed to properly support SSR, mainly in the webpack config (to produce a node version of the react package) but I'm not sure yet how to do it right. Been trying a couple of things, will send another PR if I figure it out. |
Seconding this! |
@IngoOutgo Alright - I'm going to prioritize this as soon as I have some time. |
I actually found a workaround, which worked well enough for me!
(if you're not using named exports, remove |
When including the library in a next.js app, I see the following errors:
Server Error: ReferenceError: self is not defined
self
withglobalThis
in yourbuild/index.js
leads to:Server Error: ReferenceError: document is not defined
Both of these happen because neither
self
nordocument
globals exist in a server-side-rendered environment.The text was updated successfully, but these errors were encountered: