Open mustofa-binary opened 4 years ago
I experience the same. Variable identifiers are clashing and causing problems visually.
Did you find a solution?
You probably want to use the classIdPrefix
option to svg-react-loader, as specified in the README, specifying a different prefix for each import via the import-level configuration.
As mentioned in #40 (and https://github.com/jhamlet/svg-react-loader/issues/94), it looks like special [hash]
(etc) names don't work upstream, but manually creating a different prefix string should work. If you have to do that dynamically (like in a loop that renders an undetermined number of SVGs), you'll likely have to use dynamic import()
.
lets say i have one svg which has linearGradient with
id
, and i wanted to try render the same svg on multiple places within the same page. only the first one got render because theid
is conflicting. is there a way to get a workaround on this, or can we modify the id on specific path?svg example