Skip to content

Commit

Permalink
Import lottie_light to reduce bundle size.
Browse files Browse the repository at this point in the history
AFAICT react-lottie always uses the svg renderer and
(at least in my case) the animations don't have expressions.

By importing the light version of of lottie-web one can save around
100KB (minified).

airbnb/lottie-web#929
  • Loading branch information
wpp committed Aug 20, 2019
1 parent ec416da commit 341d9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import lottie from 'lottie-web';
import lottie from 'lottie-web/build/player/lottie_light';

export default class Lottie extends React.Component {
componentDidMount() {
Expand Down

0 comments on commit 341d9ba

Please sign in to comment.