[Vuejs]-Tring to Import Vue into the Vue router

0👍

Try this approach :

import Vue from 'vue'
import VueMeta from 'vue-meta'

Vue.use(VueMeta, {
  keyName: 'metaInfo',
  attribute: 'data-vue-meta',
  ssrAttribute: 'data-vue-meta-server-rendered',
  tagIDKeyName: 'vmid',
  refreshOnceOnNavigation: true
})

For the last version of Vue3, try to use :

import { createApp } from 'vue'
import App from './App.vue'

import VueMeta from 'vue-meta'

const app = createApp(App)
app.use(VueMeta, {
  keyName: 'metaInfo',
  attribute: 'data-vue-meta',
  ssrAttribute: 'data-vue-meta-server-rendered',
  tagIDKeyName: 'vmid',
  refreshOnceOnNavigation: true
}))

Leave a comment