peoplewareDo / nativescript-svg

Nativescript plugin - support for .SVG file format
Other
70 stars 55 forks source link

Do you have support for nativescript-vue? #31

Closed ricardoorellana closed 6 years ago

ricardoorellana commented 6 years ago

Hello, I was wondering if this plugin is supported on nativescript-vue. I have tried to register it as a plugin https://nativescript-vue.org/en/docs/getting-started/nativescript-plugins/ however it did not work, it always throw a module not found error.

Module not found: Error: Can't resolve 'nativescript-svg' in '/Users/ricardoorellana/Documents/native_script_projects/castle-mobile/src' @ ./src/main.js 29:9-36

Rybak5611 commented 6 years ago

Experiencing same meme Even says Successfully prepared plugin nativescript-svg for android.

Rybak5611 commented 6 years ago

@ricardoorellana After few hours of suffering i found a solution. There is working fork made by teammaestro npm install @teammaestro/nativescript-svg Vue.registerElement("SVGImage", () => require("@teammaestro/nativescript-svg").SVGImage)

ricardoorellana commented 6 years ago

Thanks @Rybak5611 I am going to take a look to it!

mennolp098 commented 6 years ago

@Rybak5611 Does not seem to work for me. I get passed the "Error: Can't resolve 'nativescript-svg'". But after trying to load a page which has a SVGImage inside nothing happens. The page doesn't even get loaded and in the logs it did try to create the element but after that it just stops.

JS: '{NSVue (Vue: 2.5.13 | NSVue: 1.3.1)} -> CreateElement(SVGImage)'

ricardoorellana commented 6 years ago

Ok great, then I am going to close this issue. Thank you for helping me.

mikerockett commented 6 years ago

@Rybak5611 Doesn't appear to work at all.

Error in nextTick: "TypeError: com.caverock.androidsvg.SVGImageView is not a constructor"
mikerockett commented 6 years ago

Apologies, it does appear to work after a platform refresh. 🙈

Thanks :)