megasanjay / vue3-lottie

A simple Vue 3 component for using Lottie animations in Vue 3
https://vue3-lottie.vercel.app/
MIT License
374 stars 35 forks source link

Eval Issue #399

Closed awais019 closed 1 year ago

awais019 commented 1 year ago

How can I get rid of this errror

transforming (1003) node_modules/date-fns/esm/parse/_lib/parsers/EraParser.jsnode_modules/vue3-lottie/node_modules/lottie-web/build/player/lottie.js (17010:32) Use of eval in "node_modules/vue3-lottie/node_modules/lottie-web/build/player/lottie.js" is strongly discouraged as it poses security risks and may cause issues with minification.

megasanjay commented 1 year ago

This is an issue with the upstream airbnb/lottie-web library. There is nothing I can do about this for the moment. It needs to be fixed by them

mydansun commented 4 months ago

For anyone using vite, you may define an alias:

alias: {
"lottie-web": path.resolve(__dirname, "node_modules/lottie-web/build/player/lottie_light.js")
}