plugins:
- removeAttrs:
- attrs: 'fill'
input
<svg>
<path fill="#f00" d="M4 4h24v24h-24z"></path>
</svg>
output
<svg>
<path fill="#f00" d="M4 4h24v24h-24z"></path>
</svg>
expected output
<svg>
<path d="M4 4h24v24h-24z"></path>
</svg>
I tested the config file with other plugins and they work separately and in combiation with this one, though removeAttrs does no change the code in any way
I had the same problem.
The yml should be:
plugins:
- removeAttrs:
attrs: 'fill'
@jonrimmer thx.
Not sure why people can't just agree upon using json for settings. It would probably solve/prevent a lot of issues
Since nobody ever responded to this issue I actually built my own parser to handle issues that svgo has.
Closing this for now.
Actually, one can use json. It was json initially and will be correctly parsed now.
Most helpful comment
I had the same problem.
The yml should be: