KyleAMathews / typefaces

NPM packages for Open Source typefaces
2.6k stars 92 forks source link

Loading fonts when these are in a ES6 npm package transpiled with `gatsby-plugin-compile-es6-packages` #196

Closed kuworking closed 4 years ago

kuworking commented 4 years ago

I'm trying to import my component installed from npm that uses typefaces

This component is written in ES6, and I consume and transpile it with gatsby-plugin-compile-es6-packages in my gatsby website

However, the font is not loaded

The package is a very simple component with "typeface-text-me-one": "0.0.71" in package.json and then in the main component the import 'typeface-text-me-one' and the corresponding font-family

But the font never gets loaded as seen in Developer Tools

It works as expected if I do the same directly in my website

What should I do?

EDIT: I can see that the package has been downloaded in node_modules

kuworking commented 4 years ago

Closed, it actually works, quotes were wrong in font-family :)