Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove vue-lazyload as a dependancy #43

Open
hecktarzuli opened this issue Jun 19, 2018 · 6 comments
Open

Remove vue-lazyload as a dependancy #43

hecktarzuli opened this issue Jun 19, 2018 · 6 comments

Comments

@hecktarzuli
Copy link

Man I really wanted to love this package, and I was so close. Then I noticed that it's heavily dependent on vue-lazyload. Why? I'm using what I believe is a better lazy load lib (https://github.com/aFarkas/lazysizes) and I'm stuck with the decision on going with a different lightbox or having 2 lazy load libs.

This seems to be a decision I shouldn't have to make.

Can't your comp detect if lazy load is installed and do whatever it needs to?

@hecktarzuli hecktarzuli changed the title Remove vue-lazyload as a dependancy??! Remove vue-lazyload as a dependancy Jun 19, 2018
@focussing
Copy link

Same for me!

@sven-ra
Copy link

sven-ra commented Feb 20, 2019

I'm actually using it without vue-lazyload.
But I can't figure out how to add lazysizes to the lightbox?

@hecktarzuli
Copy link
Author

hecktarzuli commented Feb 20, 2019

@sven-ra, not sure how that's possible. vue-lazyload is in the package.json file as a production dependency, so you're using it.

It's imported in main.js right off the bat.. https://github.com/pexea12/vue-image-lightbox/blob/master/src/main.js

If you attempt to use lazysizes with this, you may have to resort to some trickery and/or hooks as I don't think this lib exposes the template via slots (I could be wrong)

@sven-ra
Copy link

sven-ra commented Feb 20, 2019

Okay weird. In the Readme it states that I should install vue-lazyload myself and import it into my project. Which I am not doing at the moment. Anyways the lightbox works, but the images are not using lazyload. Even when I imported vue-lazyload.

@hecktarzuli
Copy link
Author

I have a feeling I'm being dumb. main.js is for their example. I'm still 99% sure vue-lazyload will be in your node_modules but if you tree shake you're probably fine. As to why your stuff isn't working, sorry I can't help ya.

@janosrusiczki
Copy link

If anyone still cares I have removed this dependency in my fork / package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants