Closed artrayd closed 8 months ago
Regular import works well
<template>
<client-only>
<Vue3Lottie :animationData="animationData" :height="200" :width="200" />
</client-only>
</template>
<script setup lang="ts">
import { Vue3Lottie } from 'vue3-lottie'
</script>
@artrayd
If you want to install the vue3-lottie
plugin in nuxt, you should write the following code:
import Vue3Lottie from 'vue3-lottie'
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(Vue3Lottie)
// If you want to customize the component name
// nuxtApp.vueApp.use(Vue3Lottie, { name: 'LottieComponentName' })
})
Thank you @Mini-ghost, i'll make those changes in the docs
This solution from @Mini-ghost returns same error for me, and when using import it works using animationLink, but not working when using json file.
Failed to resolve component: Vue3Lottie If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
Not working in Nuxt3, done according to provided guidelines
Nuxt: 3.9.3