I've tried using both the babel plugin babel-plugin-inline-react-svg, and the Webpack loader @svgr/webpack - but after successfully importing my SVG into React, all of the group elements are removed.
i.e. I can import either as...
import MySVG from '../assets/images/mysvg.svg'
or
import { ReactComponent as MySVG } from '../assets/images/mysvg.svg'
In my sourve SVG file, each of my group element has an ID attribute that I was planning on using to animate parts of the SVG via a styled component, for example
<g id="foo"><path..../></g>
...but all of the <g> elements are being removed!
I'm exporting the SVG from Adobe Illustrator, with layer names as the group IDs. I'm currently testing this with the latest version of Next.js
Thoughts?