At the moment, this plugin works perfectly for the Options API in Vue 2 and 3.
However, I'm having problems when it comes to using it with Vue 3's Composition API since rather than using this to access the host app's state, you import functions that return that state (e.g. usePage, getCurrentInstance and inject).
All of the above functions return null when using the Composition API since the imports in your addons don't resolve to the same place as the same imports your host app.
Hi @craigrileyuk, thanks for your report, but after my test, the vue 3 composition API component is very dependent on the bundler, recommended using the Build for Static instead.
At the moment, this plugin works perfectly for the Options API in Vue 2 and 3.
However, I'm having problems when it comes to using it with Vue 3's Composition API since rather than using
this
to access the host app's state, you import functions that return that state (e.g.usePage
,getCurrentInstance
andinject
).All of the above functions return
null
when using the Composition API since the imports in your addons don't resolve to the same place as the same imports your host app.Environment: runtime registration Builder: Vite