[Vuejs]-Using external component in Nuxt not working

1👍

try to this,

in your ~/plugins/ModelGltf.js

import Vue from 'vue';
import { ModelGltf } from 'vue-3d-model';
Vue.component('ModelGltf', ModelGltf)

and then I register it in nuxt.config.js

{ src: '~/plugins/ModelGlft.js', ssr: false },

or

{ src: '@/plugins/ModelGlft.js', ssr: false },

Leave a comment