In Playground svgo option "removeXMLNS" not working
See original GitHub issue🐛 Bug Report
Hi, looks like in SVGR Playground svgo option “removeXMLNS” not working
To Reproduce
- Open SVGR playground
- set svgo config to textarea:
{
"plugins": [
{ "removeXMLNS": false },
{ "removeViewBox": false },
{ "cleanupIDs": false }
]
}
- xmlns attribute still removes
Expected behavior
“xmlns” attribute must be in svg element
Maybe i doing something wrong, but it is not worked for me
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
SVGR (SVGO) removeAttrs does not remove specified fill ...
When I manually remove fill attribute from generated <Path> in icon component I am able to change the fill via props. .svgo.yml configuration:...
Read more >Options - SVGR
When removing dimensions, SVGO will be configured not to remove the viewBox if one is present. You can override this behaviour via your...
Read more >Uncategorized – David Rickard's Tech Blog - engy.us
I created ts-npm-monorepo as a bare-bones example for how to set up a monorepo with Typescript using only NPM Workspaces. This is working...
Read more >SVGOMG - SVGO's Missing GUI
SVGOMG. Powered by SVGO v3.0.0. Open SVG. Paste markup; Demo; Contribute. Image Markup. Global settings. Show original. Compare gzipped. Prettify markup
Read more >手机端移动官网demo源码源码高亮模式在线查看|-51Aspx.com
... not-in-install[327B]; not-in-install.cmd[204B]; not-in-publish[327B] ... strip-indent[309B]; strip-indent.cmd[186B]; svgo[297B]; svgo.cmd[174B] ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@krutoo in fact we use the svgProps property and this just works -> but we got icons with differing namespaces. All naturally have the basic xmlns but others have xmlns:xlink also. So currently we setup both namespaces (xmlns and xmlnsXlink) for all while running svgr on a folder.
I would prefer and expect from svgr that it takes the svgo-optimized svg (where its my turn to remove the NS) and removes nothing more -> the only task should be the transformation to a component. Especially if svgr will follow a valid standard (the NS is the only required attribute for the svg-tag - see https://www.w3.org/TR/SVG2/struct.html#Namespace if the svg is parsed as XML)
Fixed in #498