VideoSpike / nativescript-web-image-cache

An image caching library for both Android and iOS that wraps Facebook Fresco and SDWebImageCache
MIT License
43 stars 22 forks source link

Vue & Webpack compatibility #64

Closed EddyVerbruggen closed 5 years ago

EddyVerbruggen commented 5 years ago

Hi!

I wanted to use this cool plugin in a nativescript-vue app, but when trying to do a release build (with Webpack) the build failed because of a require of nativescript-angular which obviously isn't available when building with nativesctipt-vue.

Folks using (non-Angular) core NativeScript never noticed this because those apps usually don't do a release build with Webpack, but with Vue we have to. Note that with NativeScript core this is likely to change as well because using Webpack enables a few additional cool features.

The main change is this plugin no longer assumes your project has nativescript-angular as a dependency, and consequently gets rid of the initializeOnAngular function. I left it in, but it throws an error so devs will notice. That's also why I propose to bump the major version (to 5.0.0). Updated usage instructions for Angular (and now also for Vue) have been added to the readme.

I hope you'll consider merging this. In the meantime folks can use my fork if they like, directly from GitHub because the .js files are not .gitignored: "nativescript-web-image-cache": "git+https://github.com/EddyVerbruggen/nativescript-web-image-cache.git#2b7a51a36a289b39132daabca045e92784a26d70",

This fixes #53.

EddyVerbruggen commented 5 years ago

OMG that's quick! Thanks, @bathejasumeet!