Replies: 1 comment
-
Hi @chojak, files in the As for the fonts you should place them in the And then: "To reference assets in the For more info see the CRA page on the public folder Hope this helps ✋ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm posting it as a discussion; I'm not sure if that's an issue or not.
My project structure looks like this:
project/
├── public/
├── src/
│ ├── assets/
│ │ ├── fonts/
│ │ │ ├── NunitoSans-Regular.ttf
│ │ │ ├── NunitoSans-SemiBold.ttf
│ │ ├── png/
│ │ ├── svg/
│ ├── index.css
│ ├── index.tsx
In index.css I import fonts as @font-face
That causes warnings in devtools
As mentioned there:
Originally posted by @waruyama in #29559
And that may be true, in Devtools/Application I can see these fonts loaded, but they are duplicated - one with a regular name and second with some (?) hex code. These with regular names actually contain intex.html, but others with hex code have actual font.
Moving /fonts directory into /public stops occurring these warnings. In Devtools/Application there are only fonts with correct name displaying actual fonts.
Placing it inside /public/assets/fonts makes warnings appear again.
I have no idea what may be the reason and how should I understand it. I will be much appreciated for any suggestions. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions