[Vuejs]-Oction-vue in nuxt: unexpected identifier

0👍

Two things you probably need to do. The plugin is only required on the client side so you should specify this in nuxt.config.js:

plugins: [
    "@/plugins/bootstrap-vue",
    { src: '~/plugins/octicon.js', mode: 'client' }
  ]

Secondly you may need to add it to the transpile build option, also in nuxt config.js:

build: {
    transpile: ['octicon.js']
  }

You may also want to wrap the <octicon> tag in a <no-ssr> tag.

Leave a comment