adding a prototype on vue using nuxt

Solutions on MaxInterview for adding a prototype on vue using nuxt by the best coders in the world

showing results for - "adding a prototype on vue using nuxt"
Romina
27 Oct 2019
1// create in plugins/hello
2export default ({ app }, inject) => {
3  // Inject $hello(msg) in Vue, context and store.
4  inject('hello', msg => console.log(`Hello ${msg}!`))
5}
6
7// add in nuxt.config.js
8export default {
9  plugins: ['~/plugins/hello.js']
10}