Skip to content

Conversation

@stevehobbsdev
Copy link
Contributor

Changes

Guards some instances of window usage at a module level so that builds in SSR environments (like Next.js) no longer fail just by importing the module.

References

Fixes #2051

Tested using the provided sample repro here, which now successfully builds with these changes in place: https://github.com/zackdotcomputer/auth0-lock-repro

Testing

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language

Checklist

@stevehobbsdev stevehobbsdev added the review:small Small review label Oct 22, 2021
@stevehobbsdev stevehobbsdev requested a review from a team as a code owner October 22, 2021 10:28
@stevehobbsdev stevehobbsdev requested review from a team and lbalmaceda October 27, 2021 10:54
@stevehobbsdev stevehobbsdev linked an issue Nov 2, 2021 that may be closed by this pull request
@stevehobbsdev stevehobbsdev merged commit 44968ea into master Nov 2, 2021
@stevehobbsdev stevehobbsdev deleted the fix/window-ref branch November 2, 2021 14:57
@stevehobbsdev stevehobbsdev mentioned this pull request Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:small Small review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error during gatsby server side rendering Release v11.30.5 breaks ability to use in NextJS and other SSR contexts

3 participants