Open calvinf opened 1 month ago
Looks like most of the size increase has been from changes in @lottiefiles/dotlottie-web
https://bundlephobia.com/package/@lottiefiles/dotlottie-web@0.33.0
Thanks, @calvinf, for your feedback. I'll look into this. As a note, dotlottie-react is shipped as an ESM (ECMAScript module), which supports tree shaking. This means that only the code you actually use from the library will be included in your app's main bundle, assuming you're using a bundler that enables tree shaking by default. Therefore, dotlottie-react should be tree-shakable. Could you let me know which bundler you're using?
Overview
When migrating from
@dotlottie/react-player@1.6.19
to@lottiefiles/dotlottie-react@0.8.12
, our gzipped bundle size for pages includingDotLottieReact
has increased by 30.3kb (min+gzip).Motivation
Looking at Bundlephobia showcases the size difference:
old:
new:
Request
It would be great to investigate and root cause the source of the bundle increase. Even looking at 0.7.1 to 0.8.12 of this package, the size has increased from ~16kb to ~51kb. (I haven't had a chance to look for what changed in those releases.)
With dot lottie files being focused on performance, it's really counter-productive if the library itself is ballooning in size.
Labels
Type: Enhancement
label to this issue.