storyblok-rich-text-renderer icon indicating copy to clipboard operation
storyblok-rich-text-renderer copied to clipboard

fix: allow custom components via plugin options

Open alvarosabu opened this issue 3 years ago • 0 comments

Describe issue

Passing custom resolvers for bloks inside via the plugin was overwriting the rest of default resolvers, causing errors.

Also, custom resolvers where not rendered

import CustomComponent from './components/CustomComponent.vue';
...
app.use(plugin({
  resolvers: {
    components: {
      'custom-component': () => h(CustomComponent)
    }
  }
}));

Solution

This PR adds a condition to add defaultResolvers when options.resolvers is passed to createRenderer

alvarosabu avatar Dec 03 '21 16:12 alvarosabu