-
Notifications
You must be signed in to change notification settings - Fork 28
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
Bundle size #244
Comments
@fostimus For a better understanding, you can review the bundle sizes on https://bundlephobia.com/package/@dotlottie/[email protected] or even test the package out yourself. Hope this helps! :) Additionally, you can check out the dotlottie playground and inspect the bundle size of the player directly from the network tab in your browser's developer tools. |
But bundle not only dotlottie, also have lottie_worker, lottie_canvas, lottie_html, lottie_svg... vite build(manualChunks):
webpack build(splitChunk):
|
@xyhxx, please note that only one module will be lazy-loaded based on the renderer type that your DotLottiePlayer uses. Not all of the modules will be part of your main bundle. For a more precise bundle size measurement, consider using tools such as size-limit or bundlephobia |
I face the same issue. I deploy on Cloudflare Pages and it seems like the bundle-size not being reduced during the build. CF has a 2mb limit, so the deployment would fail. |
I'm seeing the same issue - using |
the same. it adds ~500kb gzipped |
This dotLottie player is built on top of lottie-web, which has a bundle size of approximately 500KB 😞. But recently, we launched a new dotLottie player (dotlottie-web), based on the ThorVG vector graphics renderer. This new player offers a better JS bundle size, and consistent rendering across different platforms(Mobile & Web), thanks to ThorVG's portability. If the bundle size is a major concern for you, I recommend trying out dotlottie-web. The new dotLottie player's size is roughly 14KB gzipped, but it requires an extra HTTP request for loading the core dotLottie rust player WASM bindings from npm CDN. For more insights into dotlottie-web and to determine if it suits your needs, you may find this blog post and codepen examples helpful: |
Can someone explain to me the tradeoffs between dotLottie and using json files?
The react player package for dot Lottie files is 2MB... Seems incredibly heavy to send to the browser vs. importing the JSON player and JSON files.
The text was updated successfully, but these errors were encountered: