-
Notifications
You must be signed in to change notification settings - Fork 64
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
Allow usage with server side rendering / gatsby #19
Comments
Hi, quick question -- are you calling |
It doesn't matter. The problem occurs always, even if However, for now I found a workaround using
This way the script won't be included when building server-side. |
Was having the same issue, this fixed it. |
Hello,
first let me thank you a lot for providing and supporting such an easy to use library.
I'd like to use it within one of my Gatsby projects. Gatsby compiles a static version of each page/route and therefore the build fails if the code tries to access
window
.Usually, we can come around this issue by checking for
typeof window !== 'undefined'
before it is used anywhere, but that doesn't work in this case. It seemswindow
is accessed/required right after importing. Can you follow me?Sadly, I'm not really sure how to resolve this problem, but I'm trying to investigate the webpack build.
The text was updated successfully, but these errors were encountered: