Static GitHub Issues

[2891] Unable to use external Vue plugin

prev: Option for relative paths
next: Vuex not updating component view when state changing

Trying to get the Dragabilly Vue plugin to work with my Nuxt site: https://www.npmjs.com/package/vue-draggabilly

I've used the usual approach that has worked with similar plugins but I don't have the depth of knowledge to crack this one. I am adding into my nuxt config file:

 plugins: [
   { src: '~/plugins/vue-draggabilly.js', ssr: false }
  ]

That file includes this code:

import Vue from 'vue'
import VueDraggabilly from 'vue-draggabilly'

Vue.use(VueDraggabilly)

However, I get the following error and I'm not able to use:

vue-draggabilly.js:3 Uncaught ReferenceError: exports is not defined

This refers to this line in the plugin:

exports.install = function (Vue, options) { ....

Any help very greatly appreciated!

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2513">#c2513</a>)</em></sub></div>