aeirola / react-native-svg-asset-plugin

Asset plugin for importing SVG images in React Native
https://www.npmjs.com/package/react-native-svg-asset-plugin
MIT License
68 stars 9 forks source link

Support uri? #8

Closed MrHazimAli closed 5 years ago

MrHazimAli commented 5 years ago

Hye, the projects look interesting, I have a question.. does this package support svg that is coming from uri? such

https://restcountries.eu/data/mys.svg

Thanks!

aeirola commented 5 years ago

Hi, thanks for the interest in the project. The asset plugin itself doesn't include any specific support for loading SVGs from URIs. But other parts of the bundling process could possibly handle loading imports from remote resources. Not sure if there is any such functionality available for metro at the moment though. What kind of use case do you have in mind?

Do take into account though, that the asset plugin is only able to handle SVG imports during compile time, and any dynamic SVG content would need to be rendered during runtime by something like react-native-svg.