Skip to content
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

Adds support for Next.JS and Gatsby #17

Merged
merged 1 commit into from Oct 2, 2019
Merged

Adds support for Next.JS and Gatsby #17

merged 1 commit into from Oct 2, 2019

Conversation

aleccool213
Copy link
Contributor

  • Simply adds a flag to not run the code when window is not defined
  • This is a crude, simple solution that is not elegant
    • Likely a better solution to this
  • This is just to get it working for my personal blog which uses GatsbyJS
  • I have not tested with Next.JS

@sandoche
Copy link
Owner

sandoche commented Aug 12, 2019

Have you tried to replace window with this ?
It should work according to @frencojobs #15 (comment)

@aleccool213
Copy link
Contributor Author

@sandoche No, I read that and wasn't convinced that is the correct solution. Do you have any insight into why that would be better? IS_BROWSER is very clear to the reader.

@sandoche
Copy link
Owner

Why did you change the linting rules ?

@aleccool213
Copy link
Contributor Author

@sandoche Sorry about that! I accidentally committed it. I pushed up my changes without the eslint changes.

@adithwip
Copy link

Been waiting for this PR to merge 😅

@sandoche
Copy link
Owner

Yes sorry I didn't have the time yet.
I will check this out this weekend!

@sandoche sandoche merged commit e48f49a into sandoche:master Oct 2, 2019
@sandoche
Copy link
Owner

sandoche commented Oct 2, 2019

@adithwip Branch finally merged!
@aleccool213 THanks for this amazing fix!

@adithwip
Copy link

Amazing!
Thanks for the fix @aleccool213
And thanks for this marvelous project @sandoche

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants