Code Monkey home page Code Monkey logo

Comments (16)

Tahul avatar Tahul commented on August 16, 2024 3

Hello @timmaier ;

There is no better advice I can give you than considering updating your app to Vue 3. 🤗

Still, I want Vue 2 to be compatible with this, as it is relying entirely on Composition API, that is available to Vue 2, there should be no issue.

The main "failing" point I can see is the directives, that are not working the exact same.

I'm still digging around this daily and hope I can get a fully working version really soon.

from motion.

Tahul avatar Tahul commented on August 16, 2024 2

Hey, please try 1.2.3!

I've been trying a local Vue 2 vue-cli app, and it works like a charm!

Please let me know if you have any issues.

We're getting closer of universal support. 🙏

from motion.

timmaier avatar timmaier commented on August 16, 2024 2

Massive thankyou working in my Vue 2 project now!

from motion.

Tahul avatar Tahul commented on August 16, 2024 1

Hello @ChangJoo-Park ;

This error is due to the fact that you're using vue-cli which does not seem to support esm-bundler. 😣

I've been pushing a new version 1.2.0 that should fix this problem.

Could you give it a try and tell me if this works for you?

Thank you for your feedback. 👍

from motion.

Donskelle avatar Donskelle commented on August 16, 2024

I had the same problem. It wasn't even possible to install with npm because of wrong peer dependency of composition api. It needs to be >= 1.0 but beta or rc doesn't seem to meet the condition. I was able to install it with yarn.

I also saw an other issue related to vue 2 support.
Global state is defined as reactive (b8e35f7) but Vue 2 Composition API requires to be initialised before creating refs or reactives.
This can cause problems if vue motion is loaded in the same chunk

from motion.

Donskelle avatar Donskelle commented on August 16, 2024

I also saw an other issue related to vue 2 support.
Global state is defined as reactive (b8e35f7) but Vue 2 Composition API requires to be initialised before creating refs or reactives.
This can cause problems if vue motion is loaded in the same chunk

Ohh this seems to be fixed here 475451a

from motion.

sukai-cheng avatar sukai-cheng commented on August 16, 2024

I have met this problem too

from motion.

Tahul avatar Tahul commented on August 16, 2024

Hello @Donskelle, @sukai-cheng, @timmaier

I've pushed 1.0.7 that might fix the problem you have with the dependency on @vue/composition-api.

Could you please give it a try and tell me if everything is going okay?

Thank you for your patience. 🙏

from motion.

timmaier avatar timmaier commented on August 16, 2024

I just started a fresh project via vue cli with vue 2 using npm and still no luck getting v-motion directive to have any effect.

Thanks for all the work you've put in to this package, it works in Vue 3 and tbh this just gives me more incentive to begin the tedious task of migrating my old project to Vue 3!

from motion.

Tahul avatar Tahul commented on August 16, 2024

Hello everyone,

Could you please try the latest version (1.1.9) I published, and give me your feedbacks on Vue 2 support?

I think it is fixed and this issue can be considered closed, but I would love to get your feedback beforehand.

Have a good evening 😄

from motion.

ChangJoo-Park avatar ChangJoo-Park commented on August 16, 2024

Hello everyone,

Could you please try the latest version (1.1.9) I published, and give me your feedbacks on Vue 2 support?

I think it is fixed and this issue can be considered closed, but I would love to get your feedback beforehand.

Have a good evening 😄

Hello @Tahul, I tried version 1.1.9 with Vue.js 2. but It failed with error messages here.

 error  in ./node_modules/@vueuse/motion/dist/index.esm-bundler.js

Module parse failed: Unexpected token (898:39)
You may need an appropriate loader to handle this file type, currently no loaders are configured to 
process this file. See https://webpack.js.org/concepts#loaders
|     const valueTransition = getValueTransition(transition, key);
|     // Get origin
>     let origin = valueTransition.from ?? value.get();
|     // Is target animatable
|     const isTargetAnimatable = isAnimatable(key, target);

 @ ./src/main.js 7:0-46 10:8-20
 @ multi (webpack)-dev-server/client?http://192.168.0.18:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

I know make a plugin supporting Vue.js 2 and 3 is painful. I hope this error message for this issue.

repo here : https://github.com/ChangJoo-Park/vueuse-motion-issue-8

from motion.

timmaier avatar timmaier commented on August 16, 2024

Closer but no cigar yet!
At least I'm seeing console errors now!

Uncaught (in promise) TypeError: Cannot add property opacity, object is not extensible
Screenshot 2021-02-28 212438

Thanks for all the effort!

from motion.

Tahul avatar Tahul commented on August 16, 2024

Closer but no cigar yet!
At least I'm seeing console errors now!

Uncaught (in promise) TypeError: Cannot add property opacity, object is not extensible
Screenshot 2021-02-28 212438

Thanks for all the effort!

I'm on it, will be fixed soon.

from motion.

Tahul avatar Tahul commented on August 16, 2024

I found a new issue, transform properties seem to be applied while style ones does not.

I'll continue to dig around this issue as it is working well in Vue 3.

Thank you all for your help.

from motion.

Tahul avatar Tahul commented on August 16, 2024

I found a new issue, transform properties seem to be applied while style ones does not.

I'll continue to dig around this issue as it is working well in Vue 3.

Thank you all for your help.

I've fixed this in 1.2.6.

Have fun using it on Vue 2 🤗

from motion.

Tahul avatar Tahul commented on August 16, 2024

I've made multiple tests using Vue 2, and this seem to be fixed.

I'll be closing that issue for now, feel free to re-open if needed.

from motion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.