How to use plugin in nuxt.js

Asked by At

I am getting Unexpected Identifier while trying to use plugin countup.

I tried to declare the plugin like this { src: '~/plugins/vue-countup.js', ssr: false}

and globally registered the component by getting separate .js file

Getting Unexpected Identifer error while the cmd window shows 0 errors

plugins: [

  { src: '~/plugins/vue-countup.js', ssr: false}
build: {

   transpile: [
    extend(config, ctx) {

import Vue from 'vue';
import ICountUp from 'vue-countup-v2'

Vue.component(, ICountUp)

Showing Unexpected Identifier error on the window. enter image description here

0 Answers