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

@lottiefiles/dotlottie-vue compile error in a VueJS 3 project #366

Open
1 task done
thomasbalsloev opened this issue Oct 10, 2024 · 2 comments
Open
1 task done
Labels
question Further information is requested vue

Comments

@thomasbalsloev
Copy link

thomasbalsloev commented Oct 10, 2024

Overview

"error in ./node_modules/@lottiefiles/dotlottie-vue/dist/index.js
Module parse failed: Unexpected token (28:28):"

|     let dotLottie = null;
|     watch(
>       () => backgroundColor?.value,
|       (newVal) => {
|         if (dotLottie && typeof newVal !== "undefined") {

The optional chaining operator is not accepted. If I remove this one the next one raises another exception and so on.
We use this operator all the time in our own code without problems.

I can see that this package allows ES2020, but the package it wraps (@lottiefiles/dotlottie-web) only supports ES2015.
Could this be the problem?

We use Vue 3.3.13.

Consuming repo

What repo were you working in when this issue occurred?

@lottiefiles/dotlottie-vue

Labels

  • Add the Type: Bug label to this issue.
@theashraf
Copy link
Member

@thomasbalsloev
does @lottiefiles/dotlottie-vue@0.4.13 works for you correctly ? This is the previous version before the dotlottie-web es2015 support

@theashraf theashraf added question Further information is requested vue labels Oct 11, 2024
@thomasbalsloev
Copy link
Author

@thomasbalsloev does @lottiefiles/dotlottie-vue@0.4.13 works for you correctly ? This is the previous version before the dotlottie-web es2015 support

Hi @theashraf

Thanks for returning on this.

Unfortunately no. I still get the same error in the same spot.
From my package-lock file.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested vue
Projects
None yet
Development

No branches or pull requests

2 participants