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

Option to use "lighter" lottie builds #294

Closed
trueter opened this issue Feb 13, 2023 · 5 comments
Closed

Option to use "lighter" lottie builds #294

trueter opened this issue Feb 13, 2023 · 5 comments

Comments

@trueter
Copy link

trueter commented Feb 13, 2023

vue3-lottie is by far the biggest chunk in my bundle. lottie-web actually exposes different builds, e.g. only including the svg renderer and it would be great if as a vue3-lottie user I would be able to control with of those builds is loaded.

On another note, the es build does not seem to properly treeshake lodash, causing a large bundle size of vue3-lottie itself.

@tafelnl
Copy link
Contributor

tafelnl commented Feb 24, 2023

My PR #296 partially solves this. It makes use of the proper lodash package to enable tree-shaking. I don't know much about the lottie-web stuff though. Haven't looked into that.

(I am not one of the maintainers by the way)

@tafelnl
Copy link
Contributor

tafelnl commented Feb 24, 2023

Related: airbnb/lottie-web#1184

@megasanjay
Copy link
Owner

Thank you for the PR. Let me see if I can release a new version for it

@megasanjay
Copy link
Owner

Thanks, @tafelnl for your work. I just released v2.5. Should be available for download here: https://www.npmjs.com/package/vue3-lottie/v/2.5.0

@megasanjay
Copy link
Owner

This doesn't solve the original issue of adding user-selectable bundles but I can look at it in the future. Closing this issue for now

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

No branches or pull requests

3 participants