mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
docs: improve custom component dirs example (#22697)
This commit is contained in:
parent
4e538a03e2
commit
fc7bbe9223
@ -34,7 +34,20 @@ By default, only the `~/components` directory is scanned. If you want to add oth
|
||||
```ts [nuxt.config.ts]
|
||||
export default defineNuxtConfig({
|
||||
components: [
|
||||
// ~/calendar-module/components/event/Update.vue => <EventUpdate />
|
||||
{ path: '~/calendar-module/components' },
|
||||
|
||||
// ~/user-module/components/account/UserDeleteDialog.vue => <UserDeleteDialog />
|
||||
{ path: '~/user-module/components', pathPrefix: false },
|
||||
|
||||
// ~/components/special-components/Btn.vue => <SpecialBtn />
|
||||
{ path: '~/components/special-components', prefix: 'Special' },
|
||||
|
||||
// It's important that this comes last if you have overrides you wish to apply
|
||||
// to sub-directories of `~/components`.
|
||||
//
|
||||
// ~/components/Btn.vue => <Btn />
|
||||
// ~/components/base/Btn.vue => <BaseBtn />
|
||||
'~/components'
|
||||
]
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user