arielsalminen / vue-design-system

An open source tool for building UI Design Systems with Vue.js
https://vueds.com
MIT License
2.17k stars 224 forks source link

webFontLoader works with docs but not with system build #88

Closed sdellis closed 6 years ago

sdellis commented 6 years ago

Hi, this seems to be a bug. I can see that the element displays the correct font (Fire Sans) out of the box in the "living documentation" pages. However, the font is not getting built into the system build, so when I try to use it via npm install in another app, the component font falls back to Helvetica because it can't load the Google font. I've tried with typekit as well and have the same issue.

sdellis commented 6 years ago

This is "resolved" in the sense that I just had to add import WebFontLoader from "@/utils/webFontLoader" to the top of the system.js entry file.

arielsalminen commented 6 years ago

@sdellis Hey! Just returned from a 5 week “offline” trip, hence the little delay here. Need help still?

sdellis commented 6 years ago

@viljamis thank you for the follow up. I'm good now, but you may want to add that import to the system.js file in a future release. Otherwise, the css will reference the font correctly, but the fonts won't load when distributing the design system via npm.