Answer the question
In order to leave comments, you need to log in
Why can't I connect fonts in create-react-app?
Hello!
The problem is this: I create a project through create-react-app, I put the fonts in src/fonts/, I write the following in App.css:
@font-face {
font-family: 'Circe';
src: url('./fonts/Circe-Regular.woff2') format('woff2'),
url('./fonts/Circe-Regular.woff') format('woff'),
url('./fonts/Circe-Regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
font-display: swap;
}
Answer the question
In order to leave comments, you need to log in
I do this: the fonts folder contains the fonts.css file, and this file is imported into App
import “./fonts/fonts.css”
the path to the font file is incorrect, you are already in the fonts directory
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question