Open ShetlandJ opened 6 years ago
@ShetlandJ Hi, i managed to get it to work by adding this: plugins file:
import Vue from 'vue'
import VueTouch from 'vue-touch'
VueTouch.registerCustomEvent('doubletap', {
type: 'tap',
taps: 2
})
Vue.use(VueTouch)
Try adding to nuxt.config.js
plugins: [
{ src: '@/plugins/vuetouch', ssr: false }
],
build: {
/*
** You can extend webpack config here
*/
vendor: [
],
extend(config, ctx) {
if (ctx.isServer) {
config.resolve.alias['hammerjs$'] = this.options.rootDir + 'node_modules/vue-touch/dist/hammer-ssr.js'
}
}
},
Then in html :
<v-touch @doubletap="testTap">Tap me!</v-touch>
Having followed the installation instructions religiously, and read many, many posts online, I still can't figure out how to register vue-touch as a component with Nuxt. Can anyone help me out please?
package.json:
"vue-touch": "2.0.0-beta.4"
plugins/global.js:
nuxt.config.js:
vendor: ['vue-touch'],
And my HTML template in my Vue file:
I can't find anything out there to help me