Open BarneyLoosemore opened 4 years ago
I am having the same issue and additionally all my onClick
events won't work after gatsby build
and serve the site. Removing gatsby-source-prismic-graphql
makes the events work again. I had no issues while using gatsby-source-prismic
or when I am working locally.
Are you using a framework?
Hi, I have a Gatsby site that makes use of eventListener's & was confused to find them not working in my deployed site, despite being perfectly functional locally. I have safety checks (
typeof window !== 'undefined'
) so the site builds fine -window
just appears to be undefined in the site build.I've used
gatsby-source-prismic
and encountered none of the same issues with window, and I see thatgatsby-source-prismic-graphql
touches the window global on a number of occasions - just wondering if anyone has any input on this?