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

Rewrite `export { default } from 'path/to.svg'`

Open ljharb opened this issue 8 years ago • 3 comments
trafficstars

It'd be nice if a file could have export { default } from 'path/to.svg'; and have that be transformed just as if it was import x from 'path/to.svg'; export default x;.

ljharb avatar Nov 06 '17 03:11 ljharb

any progress on this ? or anything I can do to help get it merged ?

jb-san avatar Nov 13 '18 22:11 jb-san

The branch exists (https://github.com/airbnb/babel-plugin-inline-react-svg/compare/export_from) but it doesn't work yet. If you'd like to adapt it into your own PR, that'd be great.

ljharb avatar Nov 14 '18 00:11 ljharb

I just submitted https://github.com/airbnb/babel-plugin-inline-react-svg/pull/55, I think the output looks correct, but im not sure, any feedback would be helpful

jb-san avatar Nov 14 '18 02:11 jb-san