Can't get it working with nuxt
Closed this issue · 1 comments
regenrek commented
Hey
thanks for this cool plugin. Do you have a example on how to use
this with nuxt please?
Thanks in advance!
PaulHarrer commented
@regenrek Unfortunately it does currently not support SSR, so you can use it with nuxt but only with client side rendering, or you would have to rewrite it to support SSR (should not be that much work).
For that you have to create a plugin and add it to the nuxt.config.js with the client parameter. For example you can do something like (of course you first have to install the npm package ;) ):
plugins/vue-drawer-layout.js
import Vue from 'vue'
import DrawerLayout from 'vue-drawer-layout'
Vue.use(DrawerLayout)
nuxt.config.js
...
plugins: [
{ src: '~/plugins/vue-drawer-layout', mode: 'client' },
],
...