[Vuejs]-I want to use bxslider in nuxt.js. (vue.js)

0👍

Take a look at documentation https://nuxtjs.org/examples/plugins

in nuxt.config.js file

module.exports = {
  build: {
    vendor: ['bxslider']
  },
 plugins: [
   // ssr: false to only include it on client-side
   { src: '~/plugins/bxslider.js', ssr: false }
 ]
}

and in plugins folder create bxslider.js file and do the following

import Vue from 'vue'
import bxslider from 'bxslider'
Vue.use(bxslider)

Leave a comment