[Vuejs]-VueJs typescript recursive child components (throws [Vue warn]: Unknown custom element)

0👍

Ok I found the answer.
The Error is, that the FieldComponent is undefined inside the GroupFieldComponent before Created.
So I had to remove it from the Component-Decorator and import it inside the beforeCreate-function

beforeCreate () {
  if(this.$options.components)
  this.$options.components.FieldComponent = require('../Field.vue').default
}

I found the answer inside this vueJs Guide

Leave a comment