rdunk / sanity-blocks-vue-component

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

'Catch All' type #27

Open spacedawwwg opened 2 years ago

spacedawwwg commented 2 years ago

Is it possible to define a 'catch all' serializer?

Use case is to have a 'Fallback' vue component that does not break the build but simply renders a warning explaining the serializer hasn't been set

rdunk commented 2 years ago

Hey @spacedawwwg. It looks like this kind of thing was implemented in at least one official package so I think it would be a good idea to follow suit.

It's been a while since I've looked at the code but I believe there is already some logic that just returns if no matching serializer is found, so I assume it would be possible to adapt that. I think this is a good issue to prioritise so thanks for raising it.