rdunk / sanity-blocks-vue-component

[DEPRECATED] Vue component for rendering block content from Sanity
MIT License
71 stars 10 forks source link

<=0.1.0 Won't work out of the box with Nuxt and any kind of custom component #21

Closed fo-rk closed 3 years ago

fo-rk commented 3 years ago

If you are using sanity-blocks-vue-component with Nuxt, this earlier version won't work out of the box with any kind of server-side fetching or asyncData. It will work in development mode, but when you build, it will have lots of casting problems with custom components attempting to be stringified.

rdunk commented 3 years ago

Can you please provide either a minimal reproduction and specify the versions you are having issues with or at least provide the specific errors you are encountering.

fo-rk commented 3 years ago

Hi @rdunk, thanks for getting back on this. I found I had two problems, when trying the nuxt module it was fetch vs asyncData, and when trying the your sanity-blocks-vue-component I was mistakenly leaving ... mode: 'client' } for the plugin in nuxt.config.js, which meant SSR didn't have access to the component on generation.

rdunk commented 3 years ago

Thanks for following up.