-
Hello Paste team 👋🏾, we recently launched https://twilio.com/docs/twilio-cli using Paste with Next.js 🚀 We are running lighthouse audits and we stumbled with this issue: We are loading the stylesheet as you mention in the docs. We tried removing it and the fonts are still loading fine because they are also defined inline in the Checking the 'Coverage' tab in chrome devtools also points that the font.css is not used: So I'm wondering if we can delete the PS: this is also happening in https://paste.twilio.design/ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @sebas1208 Yeah, it's working as expected from our point of view. Because you're using NextJS you probably don't need to add it to the We cater for so many different use cases, our docs, and the way we build is a bit of a catch all. We mostly see a lot of SPAs that aren't statically rendered or use SSR, so using the link in the head can be beneficial to preloading the fonts before the JavaScript has downloaded and parsed. We also deal with folks who don't have access to the head at all so we load the fonts for them too. It's not necessarily harmful either way, it doesn't download the font files twice, we're just trying to help optimize the time at with the browser calls or the fonts. NextJS prerenders all the CSS in the HTML for you, so you won't get much benefit from the link in the head. |
Beta Was this translation helpful? Give feedback.
Hi @sebas1208
Yeah, it's working as expected from our point of view. Because you're using NextJS you probably don't need to add it to the
<head />
, the only benefit is thepreconnect
which might help with first time visitors.We cater for so many different use cases, our docs, and the way we build is a bit of a catch all. We mostly see a lot of SPAs that aren't statically rendered or use SSR, so using the link in the head can be beneficial to preloading the fonts before the JavaScript has downloaded and parsed. We also deal with folks who don't have access to the head at all so we load the fonts for them too. It's not necessarily harmful either way, it doesn't download the font files twic…