I had built a website with React.js and webpack.
I want to use Google fonts in the webpage, so I put the link in the section.
In your CSS file, such as App.css in a create-react-app, add a fontface import. For example:
@fontface {
font-family: 'Bungee Inline', cursive;
src: url('https://fonts.googleapis.com/css?family=Bungee+Inline')
}
Then simply add the font to the DOM element within the same css file.
body {
font-family: 'Bungee Inline', cursive;
}