moritzsternemann / vue-plausible

Plausible Analytics Vue.js Plugin and NuxtJS Module
MIT License
120 stars 8 forks source link

Version 3 compatible #16

Open jonathan-martz opened 2 years ago

jonathan-martz commented 2 years ago

Is it compatible to Version 3 of VueJs ?

jonathan-martz commented 2 years ago

For me its working but, i get an error because it cant write $plausible. I will update the Issue tomorow with the error of the console log.

jonathan-martz commented 2 years ago

The Error Message is:

Uncaught TypeError: Vue.prototype is undefined

When i remove this Line in the Vue Plugin, everything is fine. Page is working. Vue.prototype.$plausible = plausible;

YanDevDe commented 2 years ago

Added (temporary) Vue 3 support over here: https://github.com/moritzsternemann/vue-plausible/pull/17

Not merge worthy yet since some typings are being ignored (//@ts-ignore) - but it should be working fine. Any pull request at my side is welcome.

moritzsternemann commented 2 years ago

Thanks for opening the issue! Vue3 support is definitely a priority and I plan to support is as soon as possible. Unfortunately, I'm very busy until mid February and won't have time to work on this until then.

Thanks @YanDevDe for the draft PR! I'm happy to provide feedback and get this merged mid February as well.

YanDevDe commented 2 years ago

The reason why its in draft is because for Vue 3 support it should be rather in other branch, perhaps called "next".

Having 2 different Vue plugins in module/package may just waste spaces. (Unless of course you want to have both of them in a single module)

I created the draft pull request to get better understanding / quicker implementation. 👍

Thanks for the update!

ej2 commented 2 years ago

Is VueJS 3 support still being worked on?

jonathan-martz commented 2 years ago

I found a way its working quite well. https://www.oeconomicas.com/posts/2021-08-13-vue-plausible/

nimit2801 commented 4 months ago

I found a way its working quite well. https://www.oeconomicas.com/posts/2021-08-13-vue-plausible/

This link was not found