[Vuejs]-How to import vue plugins installed with npm

2👍

Following the link this is actually a component, so what you could do in your component is:

import MaskedInput from 'vue-masked-input'

export default {
    components: {
        MaskedInput
    }
}

What usually helps is by clicking through to the actual github page, and look for either an example in the README or in the actual code. In this case:

https://github.com/niksmr/vue-masked-input/blob/master/src/App.vue

There it shows you how you can use it ‘in real life’

👤Hyra

Leave a comment