marella / material-icons

Latest icon fonts and CSS for self-hosting material design icons.
https://marella.github.io/material-icons/demo/
Apache License 2.0
305 stars 36 forks source link

Files missing in the bundle #19

Closed lehoffma closed 3 years ago

lehoffma commented 3 years ago

Hey, first of all, thank you very much for this library, it has been very useful to me for quite a while!

This morning I tried upgrading to the latest 0.5.0 version and got hit by a build error:

NonErrorEmittedError: (Emitted value instead of an instance of Error) CssSyntaxError: C.\path\to\my\project\node_modules\material-icons\iconfont\material-icons.css:77:262:: Can't resolve 'MaterialIconsTwoTone-Regular.ttf' in 'C.\path\to\my\project\node_modules\material-icons\iconfont

It seems like the stylesheet is trying to include all kinds of versions of the newly added fonts, but not all of them are part of the bundle. The missing files are:

Removing all of these results in a functioning build, but would require manually editing the source material-icons.css file. I wouldn't recommend it, I just wanted to mention it as a temporary workaround for anyone reading this.

Thank you!

marella commented 3 years ago

Hey, thanks for letting me know. Fixed it in 0.5.1. Please update and try again. When downloading font files from google using different user agents, it is providing ttf file for normal icons and otf file for outlined and others. So I added a check to use ttf for normal icons and otf for others.

lehoffma commented 3 years ago

Works in 0.5.1! Thank you so much for the quick response and fix :)