vueuse / vue-demi

🎩 Creates Universal Library for Vue 2 & 3
MIT License
3.01k stars 158 forks source link

Vue 2.7: Error "VueCompositionAPI is not defined" in hasInjectionContext() still exists in vue-demi 0.14.3 #228

Closed tkallage closed 1 year ago

tkallage commented 1 year ago

unfortunately, the issue reported in https://github.com/vueuse/vue-demi/issues/224 still exists in vue-demi 0.14.3 / pinia 2.1.1.

My previous example only used the iife version of vue-demi, but another error breaks pinia in the cjs and mjs versions of vue-demi.

codesandbox with Pinia 2.0.33 (working): https://codesandbox.io/s/pinia-2-0-33-vue-2-7-14-7tom1g codesandboxwith Pinia 2.1.1 (broken): https://codesandbox.io/s/pinia-2-1-1-vue-2-7-14-c0gdvx

I hope, this helps :)

tkallage commented 1 year ago

My Vue 2.7 + pinia 2.1 setup works now. Thanks a lot for the super fast fixes @posva + @antfu ! ♥️