Skip to content

Font imported in CSS file flagged as unused #26

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

Open
Soviut opened this issue Mar 31, 2025 · 0 comments
Open

Font imported in CSS file flagged as unused #26

Soviut opened this issue Mar 31, 2025 · 0 comments

Comments

@Soviut
Copy link

Soviut commented Mar 31, 2025

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.

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

No branches or pull requests

1 participant