-
Notifications
You must be signed in to change notification settings - Fork 80
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
SSR options #31
Comments
Hi @Markvandersteen, I use this package with SSR and it works perfectly! What problem do you face now? Just import it, use it as normal, you don't need any special code! |
I got it working, i did need some extra code to make it work with nuxtjs. |
Hi, @Markvandersteen what is the extra code you've added in order to get it work. |
Hey @Markvandersteen I am getting the same issue, could you paste your extra code solution in nuxt please? |
I found it, plugins/lightbox.js if (process.BROWSER_BUILD) {
const VueTouch = require('vue-touch')
Vue.use(VueTouch, { name: 'v-touch' })
} nuxt.config.js build: {
vendor: ['vue-touch'],
} |
@dmiotti @lexcode My approach was to use the System.import function.
|
Edited for updated nuxt and vue-image-lightbox An easy way to use it in Nuxt is like this: Make a plugin file:
Add the plugin to nuxt.config with SSR disabled:
Now you can use the 'light-box' component globally. It works only after you have mounted your component:
|
Hello thanks for the package, already using it in one of my projects.
I do have a question however.
Is there a way to use this package with ssr/nuxt?
If so it would be awesome if the readme contained an example, if not is something that is going to be added?
The text was updated successfully, but these errors were encountered: