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

feat(gatsby-plugin-typography): Hot Reloading for Google Fonts #10545

Merged
merged 1 commit into from
Dec 20, 2018

Conversation

LekoArts
Copy link
Contributor

So until now only the hot reloading for normal CSS styles worked but not the <link /> tags for Google's CDN. With this PR also the links to Google will update.

PR #9099 can be closed with this.
Closes #7399
Closes #9095


Changes explained:

gatsby-browser

  • Only require stuff in develop to keep build bundle size down
  • Use DOMParser workaround to set data-gatsby-typography to element to later be able to find it again
  • Remove old instance of link tag when updating
  • Only do this whole stuff if googleFonts is in the config

gatsby-ssr

  • Only add it on build because otherwise we'd have duplicate content during development

Copy link
Contributor

@KyleAMathews KyleAMathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @LekoArts! 🙏

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