nuxt-modules / prismic

Easily connect your Nuxt.js application to your content hosted on Prismic

Home Page:https://prismic.nuxtjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

asHTML serializer doesn't work

luca-smartpricing opened this issue · comments

asHTML serializer doesn't work on nuxtjs/prismic: v3.0.0

Versions

  • nuxt: v3.5.3
  • @nuxtjs/prismic: v3.0.0
  • node: 18.16.0

Reproduction

https://stackblitz.com/edit/nuxt-starter-pzgnkr?file=app.vue

commented

Hey there, thank you so much for contributing and for the nice reproduction!

This turned out to be an upstream bug with @prismicio/vue, I fixed it in 4.0.1: prismicio/prismic-vue@dfc0558

You should be able to get this fix by running npm update @prismicio/vue

Find this updated Stackblitz: https://stackblitz.com/edit/nuxt-starter-ehraxb?file=app.vue

Just a FYI also, since the Prismic plugin is also injected in Vue context, you can access it in the template through $prismic, allowing you to skip calling usePrismic() in your setup if you only need it there~

Let me know if anything!

Yes, in my project yarn up @prismicio/vue -R works! Thank you!
In your example you used $asHTML. This doesn't work. Instead as you said, $prismic.asHTML work fine.

commented

Oh yeah, my bad for the example, went too fast, updated it ☺️