Fonts discovered in bundle generation don't generate preload tags
danielroe opened this issue · 0 comments
danielroe commented
It seems the preload-tag is not generated for fonts, that are defined in tailwind.config.ts
.
I define my font in tailwind-config like this:
theme: {
fontFamily: {
body: ['"Felipa"', ...defaultTheme.fontFamily.sans],
},
},
And then set this css inside assets/css/tailwind.css
:
html {
@apply font-body;
}
Basically, nuxt/fonts
is correctly picking up and downloading this font with everything seemingly working correctly, but it does not create the preload-tag.
Here is a stackblitz:
https://stackblitz.com/edit/nuxt-starter-xrzkqs?file=app.vue
If you add this to app.vue
, the preload-tag gets added correctly:
<style scoped>
div {
font-family: Felipa, serif;
}
</style>
Originally posted by @codeflorist in #24 (comment)