Skip to content

Commit

Permalink
🐛 Fix vercel/next.js#12984 using a hacky workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
jenewland1999 committed Apr 22, 2021
1 parent e31892b commit 4d8309d
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,21 @@ class MyDocument extends Document {
as="style"
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Source+Sans+Pro:ital,wght@0,400;0,600;0,700;1,400&display=swap"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Source+Sans+Pro:ital,wght@0,400;0,600;0,700;1,400&display=swap"
media="print"
// @ts-ignore
onLoad="this.media='all'"
/>
{/* https://github.com/vercel/next.js/issues/12984 ¯\_(ツ)_/¯ */}
<style
dangerouslySetInnerHTML={{
__html: `
</style>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Source+Sans+Pro:ital,wght@0,400;0,600;0,700;1,400&display=swap"
media="print"
onload="this.media = 'all';"
/>
<style>
`,
}}
></style>
<noscript>
<link
rel="stylesheet"
Expand Down

0 comments on commit 4d8309d

Please sign in to comment.