[Vuejs]-Vuejs: declaring parent component in child component

0👍

This is something that’s prevented by webpack/browserify. You need to use asynchronous imports to import your parent component in child. Something like:

components: {
  category: () => import('./path-to-category/category.vue')
}

Please read the docs here to know why that happens https://v2.vuejs.org/v2/guide/components-edge-cases.html#Circular-References-Between-Components.

Leave a comment