Skip to content

fix: module doesn't generate fallback fonts #304

Description

@avinean

🐛 The bug

In my case there is a font-family Test.

In build mode nothing changes. No fallback font-face. No fallback in font-family value
In dev mode. No fallback font-face. Fallback in font-family value appears font-family: 'Test', 'Test fallback'

🛠️ To reproduce

https://stackblitz.com/edit/github-hjovjz?file=nuxt.config.ts

🌈 Expected behaviour

@font-face {
  font-family: 'Test';
   ...
}
* {
  font-family: Test;
}

Code above should be transformed to code below


@font-face {
  font-family: 'Test fallback';
  ...
}
*{
  font-family: 'Test', 'Test fallback';
}

ℹ️ Additional context

  • Operating System: Darwin
  • Node Version: v18.6.0
  • Nuxt Version: 3.6.5
  • Nitro Version: 2.5.2
  • Package Manager: npm@8.13.2
  • Builder: vite
  • User Config: devtools, modules, css, fontMetrics
  • Runtime Modules: @nuxtjs/fontaine@0.4.1
  • Build Modules: -

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions