Skip to content

Font imported in CSS file flagged as unused #26

@Soviut

Description

@Soviut

I have the following index.css file that imports a local font file.

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  @font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
  }
}

This gets imported into my main.tsx

import '@/assets/css/index.css'
import App from './App'

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <App />
  </StrictMode>
)

But Inter-VariableFont_opsz,wght.ttf is flagged as unused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions