Answers for "integrate plugin nuxt"

0

nuxt custom plugin

export default ({ app, store }, inject) => {
  inject("notifier", {
    showMessage({ content = "", color = "" }) {
      store.commit("snackbar/showMessage", { content, color });
    }
  });
};
Posted by: Guest on December-08-2021
0

integrate plugin nuxt

//For nuxt 3 - create a folder name plugins and create a file like plugins/vue-gtag.client.- nuxt will auto-import :)

import VueGtag from 'vue-gtag-next'

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(VueGtag, {
    property: {
      id: 'GA_MEASUREMENT_ID'
    }
  })
})
Posted by: Guest on February-26-2022
0

integrate plugin nuxt

import VueGtag from 'vue-gtag-next'

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(VueGtag, {
    property: {
      id: 'GA_MEASUREMENT_ID'
    }
  })
})
Posted by: Guest on February-26-2022

Browse Popular Code Answers by Language