[Vuejs]-Bundling external library with custom component

0πŸ‘

βœ…

X-Post from VueJS forums where I initially asked this question.

From LinusBorg:

Adding it globally

You can’t use Vue.use inside a component, it has to be added before
you start the main Vue instance (new Vue()…)

Adding it locally

adding it locally can’t work like you did, because VueTouch is not
just the component, its the plugin containing the component.

You can however do this:

import  { component as vTouch } from 'vue-touch'

...

components: {
  vTouch
}
πŸ‘€ZeroBased_IX

Leave a comment