New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not able to use addAttributes plugin #583
Comments
Any update on this? It does not work and I have no idea where to find the .svgo.yml file. |
What svgo version are you using? The plugin is available as of 7.0.1. There is a file named |
You can also enable it in your own config file or through |
I pulled it in via imagemin and imagemin grabs imagemin-svgo: 5.1.0 which in turns grabbed svgo 0.7.0. I guess that's where the problem is. I've added it myself to the file but it does not work properly though. If I try this: {
addAttributesToSVGElement: {
attribute: ["mySvg", "test"]
}
} I will get an error: If I try this: {
addAttributesToSVGElement: {
attributes: ["mySvg", "size-big"]
}
} I will get an error: Am I using it wrongly here? |
Are you able to put this up as a minimal example in a gist or repo? I'll happily take a look to see what's going on, but I'm having trouble understanding from what you've said. Also, the first example of |
Nevermind, easy enough to repro. |
Yes I thought so as well with the single string for a single attribute and I tried that as well but it does not work. This is repo where my gulpfile is located: https://github.com/stephan-v/svg-workflow You can take a look if you want. I will try to see why it is not working. |
I am also getting this issue. What was the resolution to using the addAttributes plugin? |
The code above works, but I am unable to add an attribute without a value. |
This was never resolved since I used this for a research project. I am afraid that the current implementation is broken/unfinished. |
the problem still occurs, solution? |
The addAttributesToSVGElement plugin will not function without first being defined in the .svgo.yml defaults file.
This should just need to be added to the default plugins config to be allowed for use.
The text was updated successfully, but these errors were encountered: