Directory structure:
components
components/sections/
components/sections/profile
components/sections/profile/Sidebar.vue
components/sections/main/InformationSlider.vue
Here is what default path prefix for these components would look like, without any configuration:
<SectionsProfileSidebar />
<SectionsMainInformationSlider />
And in my case, how can I omit just the Sections
prefix? So that the components usage would look like this:
<ProfileSidebar />
<MainInformationSlider />
Based on this documentation you can do this:
// nuxt.config.ts
export default defineNuxtConfig({
components: [
'~/components/sections',
'~/components'
],
});
And you should be able to use:
<template>
<MainInformationSlider />
</template>