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

Unexpected token import in nuxt

Open albertpb opened this issue 5 years ago • 4 comments

image

albertpb avatar Mar 26 '19 14:03 albertpb

It happens because original CountUp.js library was rewritten. But I found the solution. You need to add this to the build section of your nuxt.config.js:

transpile: [
  'countup.js',
],

nxmad avatar Apr 15 '19 11:04 nxmad

The above fix by @nxmad didn't work for me. I can't use this with nuxt.

indifisher avatar Mar 26 '20 16:03 indifisher

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

https://github.com/xlsdg/vue-countup-v2/issues/13#issuecomment-639915236 it works for me on both dev and prod mode

but done little change in a script tag

pksingh2612 avatar Jul 29 '20 08:07 pksingh2612