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

[Bus Nuxt JS Deploy] blueimp Gallery: Widget container not found. #blueimp-gallery #113

Open
thinguyennam4059605 opened this issue Jan 9, 2020 · 2 comments

Comments

@thinguyennam4059605
Copy link

thinguyennam4059605 commented Jan 9, 2020

"vue-gallery": "^2.0.1",
"nuxt": "^2.0.0",
npm run build
npm run start

 {
      src: '~/plugins/vue-gallery.js',
      ssr: false
    }
import Vue from 'vue'
import VueGallery from 'vue-gallery'

Vue.component('VGallery', VueGallery)

@rlam3
Copy link

rlam3 commented Dec 13, 2020

@thinguyennam4059605 were you able to find a workaround?

@Lecraminos
Copy link

Although it has been almost three years since the original request, I encountered the same issue. However, the solution is quite simple. Just make sure, that the gallery gets rendered exclusively on the client side:

Therefore, in nuxt.config.js setup your gallery-plugin file as follows:

plugins: [
   ...
   { src: '@/plugins/vue-gallery', mode: 'client' },
   ...
],

Furthermore, when using the component in the actual Vue file, make sure to wrap it into a client-only tag:

<client-only>
   <v-gallery
      :images="images"
      :index="index"
      :options="options"
      @close="index = null"
   ></v-gallery>
</client-only>

That did the trick for me...

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

3 participants