Git Product home page Git Product logo

Comments (10)

amirhkhadem avatar amirhkhadem commented on June 3, 2024 1

Thanks @laraketai I solved it in stackoverflow, here is the link: https://stackoverflow.com/questions/65545747/splidejs-in-nuxt-vue

from vue-splide.

NaotoshiFujita avatar NaotoshiFujita commented on June 3, 2024 1

All newer versions than v0.3.5 work only for Vue3 and they don't have backwards compatibility.
v0.3.5 works with Vue2, but it has the SSR issue.

from vue-splide.

NaotoshiFujita avatar NaotoshiFujita commented on June 3, 2024 1

Right, the window reference error. You have to run the version as a client mode if you really need to use it in Vue2.

from vue-splide.

modbender avatar modbender commented on June 3, 2024 1

Created it
https://github.com/modbender/nuxt-splide

from vue-splide.

pieinn avatar pieinn commented on June 3, 2024

plugin:

import Vue from 'vue'
import VueSplide from '@splidejs/vue-splide'
Vue.use(VueSplide)

nuxt.config.js:
remove '@splidejs/splide' from modules

add your plugin

plugins: [ { src: '@/plugins/splideplugin' , mode: 'client' }, ],

from vue-splide.

NaotoshiFujita avatar NaotoshiFujita commented on June 3, 2024

Solved in the latest version.

from vue-splide.

kissu avatar kissu commented on June 3, 2024

Not sure about the current state of the project (no Releases tab) but looking at this SO answer, the solution is clearly not reproducible and throws a lot of errors regarding Vue3 Composition API as it can be seen here.

image

Not sure if the version is somehow not compatible with Nuxt2 (using Vue2) as of today, but downgrading @splidejs/vue-splide to 0.3.5 solved the issue and is working fine with Nuxt2.

@NaotoshiFujita can you confirm that backwards compatibility was lost somewhere? Or do we need to write it in another way here?


A more detailed answer on how to make it work with Nuxt2 is available here.

from vue-splide.

kissu avatar kissu commented on June 3, 2024

@NaotoshiFujita you're talking about this one?

from vue-splide.

kissu avatar kissu commented on June 3, 2024

Yep, using client-only is enough to fix the DOM mismatch issue. Thanks for the details! 🙏🏼

from vue-splide.

NaotoshiFujita avatar NaotoshiFujita commented on June 3, 2024

😎👍

from vue-splide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.