28 Replies
add
<link rel="preload">
elements to entry-server
but i use @fontsource i won't know what the vite-hashed file name of the font...
you can get the url of the specific fonts you want to preload with
?url
imports, it's what we do in solidbase
we import the fontsource css normally but only preload specific font filesis one tag all i need for each font? no need for anything other than
<link rel="preload">
?one tag per font file, there's a few attributes u need for each link. i can't remember them
as="font"
each fontsource css file contains like 5 font files, u probs don't need all of them preloaded tho
its a little complex, i need to know which ones are being used
ehh we just default to the latin standard/normal-wght ones

there's at least 10 in the css 😐 which do i specify?
we just preload these ones
the others are for more exotic character afaict
or i can preload them all 😐
definitely wouldn't recomend that
i was tryna use it for fout but it didn't fix it, any ideas for fout?
preload links, see https://solidbase.dev/
yeah that's what i did, it didn't work
or maybe i did it wrong
should i add it before {assets} or after?
i put it right below viewport


._. i'm doing this
and it still flashes
should i not include .woff, only include .woff2?
is that dev or prod?
dev
i don't think u can avoid fout in dev
vinxi thing or something
is it ok i have chrome devtools cache disabled to test?
do a prod build to find out if it actually works
ok
i think it works
i'm not seeing any flash, with "cache" disabled in network tab
good
preloading that many fonts at once will probably affect your load times
i will take care of that, just wanted to make sure it works at all, thanks!