-
Notifications
You must be signed in to change notification settings - Fork 55
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
It's not work in Nuxt production mode #38
Comments
Can't even get it to run in dev mode :/ @Bombay how do you set ssr false for flickity? |
You need to create a plugin and import it in nuxt.config.js with ssr set to false. Vue.component('flickity', Flickity) |
I already set flickity with ssr false. |
|
Hi there , is this issue has been solved ? Cause I'm using flickity on nuxt project. @Bombay how is goin ? |
In my case, It wasn't working in chrome but was working in other browsers. I'm not sure why this component isn't converting the flickity dom element to a div (as it does in dev mode), but I was able to get around the issue by adding |
@toleberdyyeva Sorry for the delay. now I'm using flickity directly in mounted() and watch section.
|
I'm also getting this issue using Nuxt 2.6.2. |
Me neither. Is it possible? I'm setting Vue Flickity as a plugin for Nuxt with mode set to client and still not joy! |
@michaelpumo Have you put the no-ssr tag before your div who use vue-flickity ?
|
Thanks but I have textual content in my slider that I certainly need for SSR purposes. |
@michaelpumo you'll have all the content in ssr with this solution. |
I'm also having troubles with vue-flickity in a nuxt app. I find that it's working when I deploy the app to a heroku container, but when I deploy to a netlify container the carousel arrows/dots are not styled and the slides don't transition (even though the active dot does). i'm running |
Same for me. |
just put no-ssr tag around it like that:
|
import Vue from 'vue'
import Flickity from 'vue-flickity'
Vue.component('flickity', Flickity)
{
// other configs
plugins: [
{ src: '~/plugins/vue-flickity', ssr: false },
]
// other configs
}
<template>
<client-only>
<flickity ref="flickity" :options="flickityOptions">
<div class="carousel-cell">1</div>
<div class="carousel-cell">2</div>
<div class="carousel-cell">3</div>
<div class="carousel-cell">4</div>
<div class="carousel-cell">5</div>
</flickity>
</client-only>
</template> You can also import Flickity as a component, and register, but don't forget to wrap inside the import Flickity from 'vue-flickity';
export default {
components: {
Flickity
},
// ... |
This solution is sub-optimal since it's importing the component globally to your entire Nuxt project. Here is my solution for this: https://stackoverflow.com/a/69572014/8816585 |
I had an issue loading it when using it with
to:
And it works.. Don't ask |
I'm using nuxt.
It's working in dev mode but not working in production mode.
(flickity option is ssr false)
in dev mode
in proudction mode
The text was updated successfully, but these errors were encountered: