reuters-graphics/graphics-svelte-components

lottie-web issue with svelte kit

Opened this issue · 0 comments

There's an issue with lottie-web when the LottieScroller component is pulled from node_module. The issue goes away when LottieScroller is put in lib/ instead of node_modules.

There seems to be a known issue with lottie-web and svelte kit

I've tried a few things:

  1. In AnimationMaker.js, this is the error I get when I import lottie-web like this: import * as bodymovin from 'lottie-web';

with *

  1. In AnimationMaker.js, this is the error I get when I import lottie-web like this: import bodymovin from 'lottie-web';
    without *

  2. Added this to package.json and ran yarn. optimizeDeps: { include: ["lottie-web"], },

None of the steps solved the issue. In the meantime, if a project needs to use LottieScroller before you're back, I'll get them to put LottieScroller in lib/ instead.