Documented use of Google Fonts via next/head generates a warning in development mode #34693
Closed
1 task done
Labels
bug
Issue was opened via the bug report template.
Font (next/font)
Related to Next.js Font Optimization.
Verify canary release
Provide environment information
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
next start
Describe the Bug
When a Google Fonts stylesheet is included in a page by following the font optimization documentation, a warning is generated in the browser console in development mode:
Do not add stylesheets using next/head (see <link rel="stylesheet"> tag
.Expected Behavior
I would expect any of:
Document
(For my use case, never warning on hosted fonts and/or ignoring the warning would be ideal, as I'd like to be able to allow different fonts on a per-page basis, and because the failure cases are unlikely to apply.)
To Reproduce
Include
in a page in development mode. Observe the warning in the console.
The text was updated successfully, but these errors were encountered: