vue-countup-v2 icon indicating copy to clipboard operation
vue-countup-v2 copied to clipboard

Unexpected Identifier in nuxt

Open divyadave95 opened this issue 5 years ago • 7 comments

unexpected

divyadave95 avatar May 11 '19 11:05 divyadave95

just ran into this myself, any update @divyadave95 ?

acidjazz avatar Jun 07 '19 06:06 acidjazz

@divyadave95 this is because this does not support server-side mode, change your plugin file from countup.js to countup.client.js and your problem should be solved, you can close this @xlsdg

I think a nuxt.js plugin example on the readme.md would be nice

acidjazz avatar Jun 07 '19 06:06 acidjazz

here is mine which is working fine

import Vue from 'vue'
import ICountUp from 'vue-countup-v2/dist/VueCountUp'
Vue.component('ICountUp', ICountUp)

acidjazz avatar Jun 07 '19 07:06 acidjazz

sadly doesn't work any longer

BuddhiAbeyratne avatar Apr 15 '20 07:04 BuddhiAbeyratne

For those who need a workaround, I had succeeded by adding both 'countup.js', and 'vue-countup-v2' in nuxt.config.js

build: {
    /*
     ** You can extend webpack config here
     */
    transpile: ['countup.js', 'vue-countup-v2'],
    extend(_config, _ctx) {}
  },

chrisleekr avatar Jun 06 '20 00:06 chrisleekr

For those who need a workaround, I had succeeded by adding both 'countup.js', and 'vue-countup-v2' in nuxt.config.js

build: {
    /*
     ** You can extend webpack config here
     */
    transpile: ['countup.js', 'vue-countup-v2'],
    extend(_config, _ctx) {}
  },

It works,thx!

heyepeng avatar Jul 11 '20 20:07 heyepeng

This Works for nuxt:

build: { transpile: ['countup.js', 'vue-countup-v2'], extend(_config, _ctx) {} },

hariavers avatar Feb 01 '21 15:02 hariavers