docs: add info about `layers/` directory (#28128)

This commit is contained in:
Santiago A 2024-07-12 14:24:31 +02:00 committed by GitHub
parent 082a6f78ba
commit 7ed5bd4b2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -18,7 +18,11 @@ One of the core features of Nuxt is the layers and extending support. You can ex
## Usage
You can extend a layer by adding the [extends](/docs/api/nuxt-config#extends) property to the [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file.
By default, any layers within your project in the `~/layers` directory will be automatically registered as layers in your project
::note Layer auto-registration was introduced in Nuxt v3.12.0 ::
In addition, you can extend from a layer by adding the [extends](/docs/api/nuxt-config#extends) property to your [`nuxt.config`](/docs/guide/directory-structure/nuxt-config) file.
```ts [nuxt.config.ts]
export default defineNuxtConfig({