Skip to content

Conversation

@holgerkoser
Copy link
Contributor

Problem

Currently, the plugin configuration

Unfonts({
  fontsource: {
    families: [
      {
        name: 'Roboto',
        weights: [400],
        styles: ['normal', 'italic'],
        subset: 'latin',
      },
    ],
  },
}),

generates an error:

[vite:css] [postcss] ENOENT: no such file or directory, open '@fontsource/roboto/latin-normal.css'
file: unfonts.css:undefined:undefined
error during build:
Error: [postcss] ENOENT: no such file or directory, open '@fontsource/roboto/latin-normal.css'

Expected Solution

The configuration should lead to the successful loading of the following files:

@fontsource/roboto/latin-400.css
@fontsource/roboto/latin-400-italic.css

If the style is set to normal, the style should not be included in the file name; instead, the weight should be retained.

In case of style normal the style should be omitted not the weight
@stafyniaksacha stafyniaksacha merged commit 1253f4d into cssninjaStudio:main Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants