unplugin-fonts icon indicating copy to clipboard operation
unplugin-fonts copied to clipboard

Support: How to deal with installed fonts such as fontsource/roboto

Open JesalR opened this issue 3 years ago • 0 comments

Hi,

I'm using fontsource to bundle fonts alongside my website, but the fonts are loaded as font-face css blocks when the file is imported, and that leads to the fonts not being prefetched.

I wanted to use this package to deal with that and add prefetch directives for the fonts, however I'm unsure how to configure that.

I import '@fontsource/roboto at my React entrypoint, but that is too late for a Vite plugin to see the fonts.

Any suggestions on the pattern to tackle installed fonts?

JesalR avatar Aug 17 '22 16:08 JesalR