Comments (10)
Thanks @laraketai I solved it in stackoverflow, here is the link: https://stackoverflow.com/questions/65545747/splidejs-in-nuxt-vue
from vue-splide.
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.
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.
Created it
https://github.com/modbender/nuxt-splide
from vue-splide.
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.
Solved in the latest version.
from vue-splide.
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.
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.
@NaotoshiFujita you're talking about this one?
from vue-splide.
Yep, using client-only
is enough to fix the DOM mismatch issue. Thanks for the details! 🙏🏼
from vue-splide.
😎👍
from vue-splide.
Related Issues (20)
- Changing browser font-size freezes the slide.
- Two bugs causing failure on accessibility
- not able to access controller methods other than .go()
- Slides align vertically when the component is destroyed
- Loop mode/rewindbydrag not working if get slider data from DB with axios. HOT 2
- SplideTrack not exported HOT 1
- Eslint failed when vue-splide requires in another project
- Recently receiving type errors when building HOT 4
- Event "ready" is not registered. HOT 1
- Destroy hook is called before transition finishes HOT 2
- The size of the thumbnails varies from one another.
- Pagination jumps down and up after clicking a page element within pagination HOT 1
- Failed to compile when import css/core.
- On destroyed method unassigned after first destroy in breakpoints
- Click on slide to change route breaks slider
- Overflow event is not fired
- Typescript declaration problem ts(7016)
- Lazy loading does not work with dynamic image URLs HOT 2
- Property 'slice' does not exist on type 'U[keyof U]' HOT 2
- Outdated Dependency
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-splide.