mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
refactor(docs): rewrite intro to the components utils
This commit is contained in:
parent
ace3c30145
commit
c7c136df92
@ -826,7 +826,7 @@ export default defineNuxtModule({
|
||||
|
||||
[source code](https://github.com/nuxt/nuxt/blob/main/packages/kit/src/components.ts)
|
||||
|
||||
Nuxt 3, by default, imports components located in the `components` directory. But there might be occasions when you wish to source components from a different directory or prefer to import them only on-demand. To cater to these needs, Nuxt 3 introduces the `addComponentsDir` and `addComponent` functionalities. These tools enable you to tailor the components configuration according to your requirements.
|
||||
In Nuxt, components from the components directory are automatically imported by default. However, if you need to import components from an alternative directory or wish to selectively import them as needed, `@nuxt/kit` provides the `addComponentsDir` and `addComponent` methods. These utils allow you to customize the component configuration to better suit your needs.
|
||||
|
||||
### `addComponentsDir`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user