How to install typefaces npm font package

Im trying to implement this typefaces npm package. GitHub - KyleAMathews/typefaces: NPM packages for Open Source typefaces All it asks is you require the font in your projects entry file. Says it needs webpack. Not sure what I need to do to set this up with Redwood. This is the require statement it reccomends. What is my entry file in a redwood project?

require('typeface-slabo-13px')

Ah, I recognize that package from a Gatsby project or two! This is most likely possible, but I’ve never tried it nor does Redwood Webpack currently have font loading config. But here are the pieces so you can take a step forward and try!

First off, you’ll need to add the font loader by extending the Webpack config for your app. The docs you’ll need:

And instead of require('typeface-slabo-13px'), try this:

// web/src/index.js

import ('typeface-slabo-13px)

Index.js is definitely the file you’re looking for. I’m just not sure about the inner workings of the ‘typefaces’ package itself.

There’s one more workaround I could suggest if this doesn’t help. But I think you’d need the Webpack config regardless.