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

Svg file path is not passed to svgo

Open optimistiks opened this issue 4 years ago • 0 comments
trafficstars

Svgo has an option to pass the path to svg file to the optimize function https://github.com/svg/svgo#optimize

It allows the prefixIds plugin to automatically prefix ids with a file name https://github.com/svg/svgo/blob/master/plugins/prefixIds.js#L194

However it seems like in this plugin the path is not passed to svgo optimize https://github.com/airbnb/babel-plugin-inline-react-svg/blob/master/src/index.js#L74, and because of that, no path data is available for the prefixIds plugin.

optimistiks avatar Jun 01 '21 18:06 optimistiks