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.
![image](https://private-user-images.githubusercontent.com/65507871/401953329-e530a562-144e-44f2-9f99-407df1c98b69.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODM4NjQsIm5iZiI6MTczOTE4MzU2NCwicGF0aCI6Ii82NTUwNzg3MS80MDE5NTMzMjktZTUzMGE1NjItMTQ0ZS00NGYyLTlmOTktNDA3ZGYxYzk4YjY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDEwMzI0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTViYjMyMGMyNWRmMjYwOGYxNWRiMGRhYWM2NThjZDExMDc0OWZjMmY2NmNiZDQ1NmRkMWY0YjdkZjkwZjJlMDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6evVH_2NNsXjN84Bk_uYxagVzukx4k0t2GDMZ3AL9zo)
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