Giter Club home page Giter Club logo

Comments (5)

shayneo avatar shayneo commented on May 24, 2024

It should be compatible, the lib exports the .vue component directly, which uses the composition API in a way that is valid in both Vue 2 and 3.

Please let me know if you have any issues with this

from vue-fuse.

maxacarvalho avatar maxacarvalho commented on May 24, 2024

@shayneo if you check your package.json you will see:

...
"peerDependencies": {    "vue": "^2.6.10"  },
...

and

"devDependencies": { 
...
  "vue": "^2.6.10",
...
},

Also from your package.json, I can see "main": "src/components/VueFuse.vue",. The Vue component exported by your lib does not make use of the composition API, which is not the problem, since it should work with Vue3 and "legacy" mode.
I'm just pointing that out since you mentioned the composition API, maybe I'm missing something here, maybe there's a different hidden branch that I should pull the package from, but so far, NPM will not let me install the package on a Vue 3 project and the exported component does not use the composition API.

from vue-fuse.

shayneo avatar shayneo commented on May 24, 2024

@shayneo if you check your package.json you will see:


...

"peerDependencies": {    "vue": "^2.6.10"  },

...

and


"devDependencies": { 

...

  "vue": "^2.6.10",

...

},

Also from your package.json, I can see "main": "src/components/VueFuse.vue",. The Vue component exported by your lib does not make use of the composition API, which is not the problem, since it should work with Vue3 and "legacy" mode.

I'm just pointing that out since you mentioned the composition API, maybe I'm missing something here, maybe there's a different hidden branch that I should pull the package from, but so far, NPM will not let me install the package on a Vue 3 project and the exported component does not use the composition API.

Whoops meant to say the options api.

There is no other branch, it's intentionally exporting the .vue file which will work in 2 and 3.

Would you mind sending a link to a repo that reproduces? He happy to take a look, might just need a tweak to the peer dependency requirement.

from vue-fuse.

maxacarvalho avatar maxacarvalho commented on May 24, 2024

@shayneo

You don't need a repo to reproduce the error, just do the following:

  1. Initiate an empty project npm init
  2. Install Vue3 npm install vue@next
  3. Try to install your package

CleanShot 2021-06-19 at 10 54 24@2x

from vue-fuse.

shayneo avatar shayneo commented on May 24, 2024

thanks @maxacarvalho just published 3.0.1 which should fix: #94

from vue-fuse.

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.