-
Notifications
You must be signed in to change notification settings - Fork 391
v-touch couses problems in the DOM #73
Comments
Thanks, will look into this. |
Any solution to this yet? |
@LouiseStroeh I had few more experiences which result in happy ends with SSR problems. Yet I was not able to look back to this issue since I moved forward to another phase of the project. Few of the solutions are very simple. like this like moving export under mounted lifecycle in es5 format. If you @LouiseStroeh are currently working on this issue, also make sure you have read. https://nuxtjs.org/guide/plugins/#client-side-only the ssr: false is charming. |
@gokhanozdemir Thanks for your fast reply. I am not sure I understand your first solution - would you be kind to elaborate? So far I have tried in the nuxt.config.js file to add { src: '~plugins/vue-touch', ssr: false }, as you suggest, as well as add:
as suggest here: https://github.com/vuejs/vue-touch/tree/next |
Any updates ? Does above solution works ? |
The following works for me: package.json "vue-touch": "^2.0.0-beta.4" nuxt.config.js plugins: [
{ src: '~plugins/vue-touch', ssr: false }
],
build: {
vendor: ['vue-touch']
} plugins/vue-touch.js import Vue from 'vue'
import VueTouch from 'vue-touch'
Vue.use(VueTouch) pages/index.vue <template>
<no-ssr>
<div>
<v-touch @swipe='swipe'>
Swipe me!
</v-touch>
</div>
</no-ssr>
</template> |
☝🏻 @FPierre's solution didn't work for me |
@ShetlandJ Try this:
Try adding to nuxt.config.js
Then in html : |
None of the solution works for me. so I end up create a wrap component to return something like this. nuxt.config.js
/plugins/vue-touch.js
Touchable.vue
SomeComponent.vue
|
Hello,
I have added vue-touch@next beta-4 as a plugin with the ssr workaround, to my the vue nuxt.js. The stuff is techniccally working, however it brokes the DOM and I am getting the warning below.
I also added the resource files for your interest @LinusBorg . #66
nuxt-starter.zip
The text was updated successfully, but these errors were encountered: