adding a prototype on vue using nuxt code example
Example: adding a prototype on vue using nuxt
// create in plugins/hello
export default ({ app }, inject) => {
// Inject $hello(msg) in Vue, context and store.
inject('hello', msg => console.log(`Hello ${msg}!`))
}
// add in nuxt.config.js
export default {
plugins: ['~/plugins/hello.js']
}