Tapas Adhikary
Educator @tapaScript | Founder CreoWis & ReactPlay - Writer - YouTuber - Open Source
Hi, The content is written perfectly to solve the exact solutions that I needed. Congrats Tapas Adhikary ๐
I tried importing the exact way you mentioned to import into the index.js file, and still returns an error not found when the path matches.
import './assets/fonts/AvenirNextLTPro-Regular.otf';
in /src/index.js
Module not found: Error: Can't resolve './assets/fonts/AvenirNextLTPro-regular.otf' in 'MyPathToTheProject/src'
Great tactics mate! This was much quicker than watching a 5-minute youtube video, thank you.
Sweet and simple! I use @font-face most often but nice to know the other quick alternatives :D
Shobhit Sharma
Thank you so much, Keep Writing such use cases on React :)