#SSR seems to be broken when using VueSplide in a Vue component

5 messages · Page 1 of 1 (latest)

snow thistle
#

Hi, I'm trying to get the VueSplide slider library working on astro. The only way a can get it working is by using the client:only:"vue" directive on my main Vue component. I would prefer to use client:visible or client:media directives for SEO and better optimization but it throws me this error...

Any idea of how I can make this work or even what is going wrong there ?
Thanks !

lament yacht
#

I have tried allot of sliders, and what works for me is using the JS version and create your own VUE component.
Not all sliders will work becouse of the astro-island around your slides can mess up some sliders.

I had success with swiper.
What kind of carousel are you trying to make?

snow thistle
# lament yacht I have tried allot of sliders, and what works for me is using the JS version and...

I finally migrated to swiper too, as it seems to better suit my needs. What version of swiper are you using ?
The version 9 introduced Web Component as the new recommended usage for Vue, and the Vue lib will be deprecated in the future... I got a nice working version using the full bundle of Swiper ! But now, because the full swiper bundle is heavy, I'm trying to register only the modules I need (according to the docs : https://swiperjs.com/element#core-version-and-modules) but nothing works as expected and I have absolutely no clue for debugging :/

lament yacht
#

I use "swiper": "^9.2.2",
and made a custom vue component so i can import what I need

import Swiper, { Navigation, Thumbs, FreeMode, Pagination } from "swiper";

But for some simple carousels where I have multiple cards in view with a fixed width and no scroll snapping I created my own carousel based on native scrolling + drag.