Is there compatability with Vue 3, I'm having issues migrating

Hi there, I decided to update my personal website which uses Vue JS and Prismic. All was working smoothly until I migrated my Vue 2 > Vue 3 via the Vue CLI.

I get this js error in the console (full screenshot below) "Cannot set property '$prismic' of undefined". I believe it's because of the core changes to Vue, i.e. Vue.use(PrismicVue, ... has changed and I now use a variable referencing createApp(). I.e. my new code is vueApp.use(PrismicVue, ... and I think this is maybe causing the initialisation issue.

Also with Vue 3 we don't even import Vue from 'vue' anymore, it's all handled with createApp.

Please let me know if you have any advice or fixes for this, I'd like to use Vue 3 and Prismic so it would be ideal. Thanks in advance.

Hi Rhys,

For our kit to work Vue 3, it will require some updates. I see that you already created an issue for this, thanks for this. I'll bring this to the attention of our team and hopefully can work on it in the future.

For now though unfortunately it's not compatible, but like I said I can let the team know.

Thanks.

Hi Phil,

Thanks for getting back to me. I thought that was the case, must take a lot of people a while to catch up with updates like this.

There is a vanilla JS way right? to retrieve the Prismic data via the API. If so I'll just convert to that.

Thanks,
Rhys.

Thanks for understanding.

Yeah sure you can check out our JS docs here:
https://prismic.io/docs/technologies/javascript

This is being tracked as an open feature request.

If you have another use-case for this feature, you can 'Flag' this topic to reopen. Please use the :heart: button to show your support for the feature and check out our Feature Request Guidelines.