-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
Having issues with projects that use Vue2 and do not use the composition api. Do I need to make it compulsory in my package? #79
Comments
I have a feeling the issue I faced is related to this one #76 |
I'm having the same issue and getting this error.
This issue seems fixed before with this commit 559eec6 but it appeared again.
|
It does not make sense to use |
In that case, it shouldn't be optional dependency as it's defined here https://github.com/vueuse/vue-demi/blob/master/package.json#L44 unless that's needed for something else |
It's optional because in Vue 3 you don't need that. I think it's clear documented that you need |
@antfu I've gone with specifying in the plugin/s readme that when using Vue 2.x you have to add it, and the nuxt module that depends on it has @vue/composition-api as a devDependency |
@antfu My challenge with this is mainly the auto-install of the plugin- I know how this plugin initially was created to be able to use use composition API in libraries for Vue 2 and Vue 3 at the same time. My use case is a bit different. Right now, I'm experimenting with setups in which we can write libraries that use components (SFCs) and build them separately for Vue 2 and Vue 3, "patching" some differences like lifecyle hook names at runtime. For my usecase, vue-demi is very ueful mostly for being able to differentiate between Vue 2 and Vue 3 and getting a universal This would be a usecase for Vue-Demi where |
Maybe someone could fork and maintain one that does not include |
Fair enough, makes sense. |
Will definitely consider this.. But I'll wait until it's a painpoint to at least one user of the package |
Discussed in #78
Originally posted by sduduzog July 23, 2021
Here's my package.json
And here's my index.js
This is from a branch of a vue-supabase fork. It works for vite and vue3 but not for Vue2 using @vue/cli to create the project https://github.com/sduduzog/vue-supabase/tree/use-vue-demi
The text was updated successfully, but these errors were encountered: