question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not working in production

See original GitHub issue

This is the first time I am using this library. I am using Nuxt so I imported it with a plugin :

vue-touch.js

import Vue from 'vue'
import Vue2TouchEvents from 'vue2-touch-events'

Vue.use(Vue2TouchEvents)

nuxt.config.js plugins: [{ src: '~/plugins/vue-touch', ssr: false }],

I also tried with and without :

  build: {
    vendor: ['vue-touch']
  }

in the same config file

It’s working exactly as intended in development, but once I deploy the project to Vercel it does nothing, no error in console, just nothing, it does not execute the functions.

That’s how I used it in my components : v-touch="close" on a div v-touch:swipe.right="open" on the nuxt component in a layout v-touch:swipe.left="close" on another div

Is that a misconfiguration on my side ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
jerrybendycommented, Mar 16, 2021

This is my fault. The new version has released for a month, but I forgot to push the commits to GitHub.

And, you are right. When you assign a new namespace, for example, namespace: 'kiss', and now you can use v-kiss:tap instead of v-touch:tap.

3reactions
TCM-devcommented, Sep 3, 2020

Problem solved 2 days ago but I could not find the time to write it. My project uses vuetify, which already has a touch directive, but your library somehow override it in developement but not in production. Your library is better but I don’t know how to remove the directives from vuetify.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PWA not working in production · Issue #30692 · vercel/next.js
PWA pop-up should both appear in development as well as in production. To Reproduce. Install next-pwa; Generate manifest ( using Simicart ).
Read more >
node.js - Express-Session not working in production/deployment
Express-Session is working in development environment, as it sets the "connect.sid" cookie in my browser. However, in production it's not ...
Read more >
JavaScript Function seems to be not working in Production ...
I have a java Script function, which prevent user to add more than 5 items into the cart. function is working fine at...
Read more >
Javascript code not working on production but works on staging
I'm having an issue with a javascript file. I created a file called "on-click-place-rder.js". During checkout on the site on the payment ...
Read more >
Understanding the problem when things break in production
I understand the sort of problems that come up when a bug happens in PROD and can't be reproduced anywhere else. That's when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found