Quentin
Quentin
NNuxt
Created by Quentin on 11/6/2024 in #❓・help
components configuration in layers
Hello, I want to create a layer with configurations that i use across all my projects. One of them is to remove path prefix of components. If i put this code
components: [
{
path: '~/components',
pathPrefix: false,
},
]
components: [
{
path: '~/components',
pathPrefix: false,
},
]
in ./nuxt.config.ts, it's working fine and my component components/layout/AppHeader.vue is accessible with <AppHeader/>. But if i create a layer and write the same configuration in ./layers/general/nuxt.config.ts, it's not working and my component is registered as LayoutAppHeader in ./.nuxt/components.d.ts. Is there a way to make it work ? or maybe it's just a wrong path problem ? Thanks
6 replies