pexea12 / vue-image-lightbox

A Vue component to display an image gallery lightbox
347 stars 80 forks source link

Nuxt Page refresh #56

Closed riveraeu closed 5 years ago

riveraeu commented 5 years ago

Hey I really like this component, but am running into some issues with refreshing the page in my Nuxt app.

image

Here are my dependencies: "nuxt": "^2.0.0", "vue-image-lightbox": "^6.0.1", "vue-lazyload": "^1.2.6", "vue-touch": "^1.1.0",

and here is the page using the lightbox component

image

I have set up Lazyload as a Nuxt plugin like this

plugins/lazyLoad.js: import Vue from 'vue' import VueLazyLoad from 'vue-lazyload'

Vue.use(VueLazyLoad)

nuxt.config.js: '@/plugins/lazyLoad

What ive tried:

Any help would be greatly appreciated, thanks!

pexea12 commented 5 years ago

I am investigating it

pexea12 commented 5 years ago

The new version 6.1.1 is now SSR-supported.

However, it seems to be a Nuxt.js problem since I am unable to fix this error. When I copied the LightBox to components folder of Nuxt, everything is fine but importing vue-image-lightbox from node_modules gave this error. I think the best work-around now is copying LightBox to components folder.

riveraeu commented 5 years ago

Thanks for looking into this and for the workaround, the page is now refreshing without any errors!