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
enable support for building in a static site (before window is defined) #1
Comments
|
actually for anyone else trying to use this with gatsby, the gatsby suggested solutions are here: the solution i initially vouched for in this ticket is also the first workaround on this list:
but short of that happening, i am currently using the 3rd workaround and it resolved the issue in a way that's not terrible. |
Thanks for reaching out @edwmurph. This module is not SSR compatible, mostly because of the inclusion of I'm not familiar enough with Gatsby to provide exact syntax, but in
|
makes sense thanks! |
I made a little adjustment as the old version may not compatible with the latest nextjs.
|
Is your feature request related to a problem? Please describe.
I am trying to use this in a gatsbyjs project but the build step fails due to a reference error:
window is not defined
Describe the solution you'd like
could this library defer loading any modules that reference
window
until it is available?some ways to do this described here:
gatsbyjs/gatsby#309
Describe alternatives you've considered
this problem could also be solved on my end but i think a solution baked into your library would be more elegant.
Additional context
gatsbyjs error output posted in a below comment.
The text was updated successfully, but these errors were encountered: