Skip to content Skip to sidebar Skip to footer

Preload Font File With Hashed Name

I am using React application and has below font files but on generating the build, react creates the font files with hashed names as below: When I run the application over lighth

Solution 1:

There is no real way of doing that with react but there are work arounds. The one I'm using is in the index.html located in the public directory I add a

<div style="opacity: 0">
  <span style="font-family: 'FiraGO';"></span>
</div>

You can add as many font families as necessary with this, just make sure you also load the necessary font sources properly in your App.js.


Post a Comment for "Preload Font File With Hashed Name"