-
Notifications
You must be signed in to change notification settings - Fork 93
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
Warning: Invalid attribute name: 'data-name'
#108
Comments
I changed my type file like this and it seems to have solved the problem (the commented part was the old version) |
Apparently it didnt solve anything, imported different .svgs started having the same problem again. It seems this is related to VSCode caching the .svg files or something, because if the data-attributes are removed it will still complain about the data-attributes even when they are not there, but if you change the name and then point the import to the new path it works (apparently). So not sure if this is actually a problem with the plugin or VSCode |
I ran into a similar issue and was able to resolve by updating my .babelrc file. I updated
|
So everytime I add a new .svg file to the project I get this warning and I have to fiddle around with the width/height/viewbox of the component with random values until it works. I can't see any fix online and it just takes hours to fix any new .svg. At some point I gave up and started to use .svg in img tags but we have a requirement that the colors should be overriden by CSS so I really need to use it like a component.
The text was updated successfully, but these errors were encountered: