Lottie animation path problem

i tried to integrate an Lottie animation into the vuejs component. The animation is found in the served project, if I build the project and don’t host it on the root of the server I get an error, path not found, all other paths works great.

<lottie-animation class="lotti"
                path="./static/lotti/animation.json"

inside the vue.config.js I have this:
publicPath:
process.env.NODE_ENV === “production”
? “./” // prod
: “/”, // dev

Try this:

<lottie-animation
  ref="anim"
  :animationData="require('@/assets/animation.json')"
/>

More about this:

This is how I solved it:
import * as animationData from '@/assets/data/animation.json'
lottieOptions: { animationData: animationData.default, autoplay: false },