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

Add preloadFonts option to add <link rel="preload"> tags for fonts #502

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

0xR
Copy link

@0xR 0xR commented Oct 4, 2020

Description

Added an option to preloadFonts so I can get rid of the lighthouse warning below:
image

I also ensure that the preloadImages option will add preload tags to the document head instead of the body as describe here: https://web.dev/preload-critical-assets/

The userAgent can now be turned off as well to avoid the issue of Google Fonts serving only ttf fonts if it doesn't recognize the user agent.

Let me now if I can do anything to get it merged. I'm motivated to get rid of my lighthouse warnings.

  • tests
  • documentation
  • formatting
  • run git branch on production app

@0xR 0xR changed the title Preload fonts Add preloadFonts option to add <link rel="preload"> tags Oct 4, 2020
@0xR 0xR changed the title Add preloadFonts option to add <link rel="preload"> tags Add preloadFonts option to add <link rel="preload"> tags for fonts Oct 4, 2020
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

1 participant