DragonsInn / fontgen-loader

Automated webfont generation from SVG icons. Use with WebPack!
125 stars 42 forks source link

Combination with less or sass #1

Open jantimon opened 9 years ago

jantimon commented 9 years ago

Hi, could you think of a smart way to combine this loader with sass or less?

I would like to use the fontgen loader to generate a mixin with less or sass and reuse it in my sass or less files.

IngwiePhoenix commented 9 years ago

Unfortunately, the sass loader does not allow cross-language imports. There is no way of capturing the output or result file at "compile time". The importer of sass-loader would have to be taught how to run loaders. Then, we could change the configuration so that font files only go through the fontgen, and then the sass loader, so the sass output would go into the sass file that required it.

As you see, I have opened a ticket for that. :)

IngwiePhoenix commented 8 years ago

There might be a way to use SassPort and my Sassport Loader for this purpose now. You should look into it and see if it helps oyu, maybe.