atlowChemi / vite-svg-2-webfont

A vite plugin which generates a webfont out of svg icons
https://www.npmjs.com/package/vite-svg-2-webfont
MIT License
25 stars 8 forks source link

SCSS-Template support? #27

Closed docmg closed 5 months ago

docmg commented 7 months ago

Hey. Thank you for such wonderful plugin.

I have the following questions:

Sorry for the questions, i dont have much experience with vite and im currently trying to migrate from gulp.

PS. Im trying to use your plugin as an replacement for gulp-iconfont.

atlowChemi commented 6 months ago

Is it possible somehow to use custom scssTemplate? In configuration sadly is only possible to override cssTemplate.

You can pass a .scss template to the cssTemplate field, and change the cssDest to a file ending with .scss 🙂 See the SCSS template of @vusion/webfonts-generator here

Is it possible to import virtual module in scss files? The example in readme is only for js/ts.

I am honestly not sure regarding this, but you could give it a try, would be great to document it if it works! 🤩

How can i use the webfont-icon mixin if it is not possible to import scss file generated by the plugin?

Again - have a look at the @vusion/webfonts-generator template which uses it 🚀

Sorry for the questions, i dont have much experience with vite and im currently trying to migrate from gulp. PS. Im trying to use your plugin as an replacement for gulp-iconfont.

Don't be sorry, I hope this tool could be useful 😄

atlowChemi commented 5 months ago

I'll be closing this issue, if you feel there is any further questions, or if you wish to open a PR clarifying the documentation - feel free to reopen 🙂