Hi! Awesome work with this library!
I want to keep the viewBox attribute of the SVG without resizing it to 1em, and without having to pass the property implicitly via --svg-props, is there a way to do it?
Thanks 馃
Hey @endikai :wave:,
Thank you for opening an issue. We'll get back to you as soon as we can.
Please, consider supporting us on Open Collective. We give a special attention to issues opened by backers.
If you use SVGR at work, you can also ask your company to sponsor us :heart:.
Hi @endikai the viewBox is removed by SVGO. What I do to keep it in the code is to have this in my .svgrrc.js:
module.exports = {
svgoConfig: {
plugins: {
removeViewBox: false,
},
}
/* the rest of the config */
};
You can find more info here: https://react-svgr.com/docs/options/
Under the "SVGO config" title.
Most helpful comment
Hi @endikai the viewBox is removed by SVGO. What I do to keep it in the code is to have this in my
.svgrrc.js:You can find more info here: https://react-svgr.com/docs/options/
Under the "SVGO config" title.