target / react-native-svg-parser

Parses SVG files and converts to 'react-native-svg' format objects. NOTE: This project has been archived.
MIT License
42 stars 16 forks source link

Babel plugin #3

Open msand opened 6 years ago

msand commented 6 years ago

Hey, great work with the parser. Have you thought about making this a babel plugin? Then one could import a .svg file and get a component as the default export. This would also make the parsing a build time thing, rather than happen on every run. What do you think?

Titozzz commented 6 years ago

Someone created a CLI, https://github.com/chrisbull/svg-to-react-native-cli, for build time, but a babel plugin would definitely be better

a-r-d commented 6 years ago

@msand I really like the babel plugin idea. Will work on it when I get some time!