Why can't I connect fonts in create-react-app?

0 like 0 dislike
4 views
Hello!

The problem is: create the project using create-react-app, put the fonts in src/fonts/ App.css prescribed is:
@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; }


And in the console gives: Module not found: Can't resolve './fonts/Circe-Regular.ttf' in 'F:\\web-dev\\in-process\eact-test\\

Tell me, why webpack not see this font? Thank you.
by | 4 views

1 Answer

0 like 0 dislike
I'm doing this: the fonts folder is a file fonts.css and this file is imported in the App

import “./fonts/fonts.css”
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
33,962 users