You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if this library did not require window to exist. Otherwise this can't be used with a next.js app or be imported during SSG.
What would it take to check typeof window !== 'undefined' or something before referencing the window object? Or at least not reference window when the library is imported, and instead wait until some raygun function is invoked (lazy)?
We're aware of the difficulties of using raygun4js with frameworks like Next.js and Remix, and we're considering how best to improve the UX for integrating Raygun with these frameworks.
In future we may support both Node and the browser in a single library, but presently this is the best way to go, and also lets you utilise the full feature-set of each library.
It would be great if this library did not require
window
to exist. Otherwise this can't be used with a next.js app or be imported during SSG.What would it take to check
typeof window !== 'undefined'
or something before referencing thewindow
object? Or at least not referencewindow
when the library is imported, and instead wait until some raygun function is invoked (lazy)?Or is there another solution?
Thanks
Related: #301
The text was updated successfully, but these errors were encountered: