unplugin-fonts
unplugin-fonts copied to clipboard
Support: How to deal with installed fonts such as fontsource/roboto
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?