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

Animation not following instruction in local svelte build #32

Open
Rassibassi opened this issue Dec 18, 2021 · 4 comments
Open

Animation not following instruction in local svelte build #32

Rassibassi opened this issue Dec 18, 2021 · 4 comments

Comments

@Rassibassi
Copy link

Rassibassi commented Dec 18, 2021

Hej,

I am trying to integrate lottie-web and lottie-api in a Svelte application.
I took the following codepen example:
https://codepen.io/driezis/pen/zYOQLrw

and made a svelte version from it:
https://codesandbox.io/s/followingfacesvelte-3grho

It works nicely in the codesandbox, but when I download the zip with all the files from the codesandbox and try to have it build locally, the face is not following the mouse.

It may has something to do with this issue: airbnb/lottie-web#2599

I am out of my depth by now, any suggestions on how to solve this?

Best,
Rasmus

@bodymovin
Copy link
Owner

hi, can you share a link with the build breaking so I can take a look?

@Rassibassi
Copy link
Author

Not sure, what you mean, but if you follow this link: https://codesandbox.io/s/followingfacesvelte-3grho

Then just above where you can see the files (the file explorer), next where it says "Files", there is an arrow down button, which let's you download a zip file.

unzip, and run yarn install and yarn dev, and then visit the localhost served page, and the face does not follow the mouse :(

@bodymovin
Copy link
Owner

Yes, it's the same problem. Rollup doesn't correctly build the library and breaks.
I'm working on a fix but it will take some time to have it working. Perhaps in a couple of weeks.
As a workaround, I'd suggest to load the library separately instead of being part of the build

@Rassibassi
Copy link
Author

Rassibassi commented Dec 19, 2021

Cool, thanks for your answer. I made the app work locally by using svelte with webpack instead of rollup.

For anyone bumping into this issue, my workaround:
I started developing the svelte/webpack version from this repository, https://github.com/sveltejs/template-webpack and bumped all the dependencies to latest via yarn upgrade --latest, then built my svelte app from there.

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

2 participants