components icon indicating copy to clipboard operation
components copied to clipboard

Need to manually import a nested component

Open Flawe opened this issue 4 years ago • 4 comments

I have two components:

components/
 - ComponentA.vue
 - ComponentB.vue

And if I want ComponentA to use ComponentB, it seems I still need to manually import ComponentB. Is this expected, or am I doing something wrong?

Flawe avatar Feb 05 '21 04:02 Flawe

the same here !!! :/

MuhammadMoftah avatar Feb 16 '21 18:02 MuhammadMoftah

Hi. Would you please try with nuxt 2.15?

pi0 avatar Feb 16 '21 19:02 pi0

@pi0 could you help me i get this error Unknown custom element: <Searchbar> - did you register the component correctly? For recursive components, make sure to provide the "name" option. what name ?

i have this structure

  • components
    • Header
      • Header.vue
      • Searbar.vue

and inside Header.vue i include <Searchbar />

but its not working anymore with 2.15 it worked fine with 2.14.12

EDIT: ah this works <HeaderSearchbar />

kgnfth avatar Feb 17 '21 14:02 kgnfth

See https://github.com/nuxt/components/issues/153

regenrek avatar Feb 19 '21 15:02 regenrek