babel-plugin-inline-react-svg icon indicating copy to clipboard operation
babel-plugin-inline-react-svg copied to clipboard

[Fix] Fix crash when svg has a style tag in the root element

Open dozgunyal opened this issue 3 years ago • 4 comments
trafficstars

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.

dozgunyal avatar Sep 02 '22 11:09 dozgunyal

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

dozgunyal avatar Sep 02 '22 18:09 dozgunyal

@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 avatar Sep 02 '22 20:09 ljharb

@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?

akellbl4 avatar Sep 13 '22 19:09 akellbl4

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.

ljharb avatar Sep 13 '22 20:09 ljharb