nativescript-community / ui-image

Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.
Apache License 2.0
36 stars 9 forks source link

Nativescript-Vue imageModule.initialize() not working #11

Closed random-webdeveloper closed 3 years ago

random-webdeveloper commented 5 years ago

Tried to replicate https://github.com/Akylas/nativescript-image/blob/master/demo-vue/app/app.js but at imageModule.initialize() it tells me while compiling "Cannot read property 'initialize' of undefined" imported imageModule like in the example with import * as imageModule from 'nativescript-image'; When i log the imageModule before the initialize i get an object with just a few string key-values. if i do console.log(imageModule === undefined); it logs false, so it should be defined, despite telling me it is not.

you can find the error log here: https://pastebin.com/K4kUdYiJ

I don't think it matters here, but i'm developing on android.

am I doing something wrong here?

farfromrefug commented 5 years ago

There must be something wrong with your setup. Hard to say without your full setup:

random-webdeveloper commented 5 years ago

Like the title says, I'm using vue. Not using typescript and here is my webpack.config.js: https://pastebin.com/qH8JdnEP (it got generated by an official demo from the nativescript-vue tns cli thing. Has not been touched since.)

farfromrefug commented 5 years ago

@Nais0ne you have a babelrc ? it should work as it is. you can look at the generated js in the platforms folder to see what s happening

random-webdeveloper commented 5 years ago

I'm so sorry guys, deleting the platforms folder fixed it for me, sorry for bothering you :/