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

[Bug]: Not working after switch from vite-plugin-fonts

Open ffind opened this issue 1 year ago • 6 comments

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

ffind avatar Apr 05 '23 12:04 ffind

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

cssninjastudio[bot] avatar Apr 05 '23 12:04 cssninjastudio[bot]

Any updates on this? Just tried to use this over vite-fonts but same issue... I have no fonts injected whatsoever in local dev.

michtio avatar May 24 '23 08:05 michtio

Same here :(

pantajoe avatar Aug 04 '23 09:08 pantajoe

Did you add import 'unfonts.css' in your app?

stafyniaksacha avatar Aug 05 '23 14:08 stafyniaksacha

Yes, I did. Maybe a reproduction would help?

pantajoe avatar Aug 07 '23 08:08 pantajoe

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.

vojty avatar Aug 15 '23 14:08 vojty