babel-plugin-inline-react-svg
babel-plugin-inline-react-svg copied to clipboard
[Fix] Fix crash when svg has a style tag in the root element
Hi, Fixes https://github.com/airbnb/babel-plugin-inline-react-svg/issues/105
Also sends the path name to SVGO.optimize as recommended and fixes the PrefixIds plugin to support dynamic file name prefixes.
Thank you in advance.
What's the benefit of passing the path to
optimize?
some plugins like prefixId depends on it. Such as adding the file name as prefix to all ids, which is super helpful to prevent style conflicts
@lencioni this is good to go, but travis tests need fixing, and i can't do that efficiently without the ability to push to master (a branch protection requiring review prevents me). mind taking care of one or the other of those?
@ljharb I took a look and it seems the latest NPM doesn't work with Node 10.x. Maybe it's worth dropping tests for Node 10.x?
Nope, it’s not :-) but that’s not the issue; it’s that Travis doesn’t have an up to date version of nvm. Switching to GitHub actions would resolve that without needing a breaking change.