nuxt-modules / svg-sprite

Optimize SVG files and combine them into sprite
https://codesandbox.io/s/github/nuxt-community/svg-sprite-module/
MIT License
293 stars 41 forks source link

Different SVGO options for each sprite #205

Open oncode opened 3 years ago

oncode commented 3 years ago

Hello, thanks for the awesome module! I was wondering if there is a possibility to use different SVGO options depending on the spritesheet that is generated. I would like to use the default one for monochromatic icons (/icons) where I overwrite colors with currentColor (convertColors.params.currentColor = true) and one for colored icons (/icons/colored) where it doesn't overwrite them.

farnabaz commented 3 years ago

Hello @oncode, The idea seems intresting, in order to achieve this, we should refactor module core to support custom config based on sprite.

If you want to, contribution is more than welcome 👍

oncode commented 3 years ago

Thanks, I will have a look and try implement it. 👍🏻

joachim-pryntad commented 2 years ago

@oncode any updates on this feature? I just ran in a problem, where this would be extremely helpful :)