unplugin-fonts
unplugin-fonts copied to clipboard
[Bug]: Not working after switch from vite-plugin-fonts
Demo URL
No response
What happened?
Switched to unplugin-fonts
by this guide https://github.com/cssninjaStudio/unplugin-fonts/releases/tag/v1.0.0
No warnings or errors and no links with fonts injected
"vite": "^3.0.5",
-"vite-plugin-fonts": "^0.7.0"
+"unplugin-fonts": "^1.0.0
-import { VitePluginFonts } from 'vite-plugin-fonts'
+import Unfonts from 'unplugin-fonts/vite';
-VitePluginFonts({
+Unfonts({
custom: {
display: 'swap',
families: {
Basketcase: {
src: resolveApp('public/fonts/BasketcaseRomanNumbers*')
}
}
}
}),
Reproduction steps
1. Used guide to switch from `vite-plugin-fonts` to `unplugin-fonts/vite`
Relevant log output
No response
What browsers are you seeing the problem on?
Chrome
What is your operating system?
MacOS
Hello @ffind! Thanks for opening this issue, we will get back to you soon! Until then, feel free to join us on discord
If you love our work, please consider sponsoring us
Any updates on this? Just tried to use this over vite-fonts but same issue... I have no fonts injected whatsoever in local dev.
Same here :(
Did you add import 'unfonts.css'
in your app?
Yes, I did. Maybe a reproduction would help?
I thought it wouldn't work at the beginning too but then I realized I had the wrong path to the font files. Maybe it could log a warning to the console when no files were matched.