Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minified worker module #3094

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edoardocavazza
Copy link

This PR attempts to fix minified code for the worker module.

Issue: #2748

The problem here is that the final worker code is transformed into an UMD module that defines the module variable.
The internal Lottie code runs in the worker, but it is loaded using toString on a function that is affected by minification. When the minifier run, it thinks module is defined and then remove any other check.
This PR resets the module variabile definition in the wrapper.

it ss a kind of workaround, but I think is safer than rewriting the whole Lottie module system 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant