Open RomanSkrypnik opened 3 months ago
i have the same problem(
I have found the root of the problem - minification Not minified lottie.js works fine but if I use minified one - getting this error I found out it by using CDN-s: https://cdnjs.cloudflare.com/ajax/libs/lottie-web/5.12.2/lottie.min.js - web worker won't work https://cdnjs.cloudflare.com/ajax/libs/lottie-web/5.12.2/lottie.js - works with web worker
This part of code causes the problem:
Minifier doesn't transform _workerSelf
in a
- that why a is not defined
After renaming _workerSelf
to a
manually - everything works fine
@Hernan-Dev could you please check this issue?
Same Problem here !
Tell us about your environment
Lottie version - 5.10.2
What did you do? Please explain the steps you took before you encountered the problem. I decided to enable webworker for lottie on my nuxt project. Everything works fine in dev mode but doesn't work in build one
What did you expect to happen? Animation works with webworker in build mode
What actually happened? Please include as much relevant detail as possible. Here is my repro: https://github.com/RomanSkrypnik/nuxt-lottie-worker-issue I'm facing this error:
P.S: I left comment where you can comment web worker to check ( app.vue ):