Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ffind opened this issue Apr 5, 2023 · 6 comments
Open

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

ffind opened this issue Apr 5, 2023 · 6 comments
Labels
bug Something isn't working vite-3.x

Comments

@ffind
Copy link

ffind commented Apr 5, 2023

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 ffind added the bug Something isn't working label Apr 5, 2023
@cssninjastudio
Copy link

cssninjastudio bot commented Apr 5, 2023

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

@michtio
Copy link

michtio commented May 24, 2023

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

@pantajoe
Copy link

pantajoe commented Aug 4, 2023

Same here :(

@stafyniaksacha
Copy link
Member

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

@pantajoe
Copy link

pantajoe commented Aug 7, 2023

Yes, I did. Maybe a reproduction would help?

@vojty
Copy link

vojty commented Aug 15, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vite-3.x
Projects
None yet
Development

No branches or pull requests

5 participants