docs: add a note about compatibilityVersion feature flag (#30274)

This commit is contained in:
Martins Zeltins 2024-12-16 17:09:05 +02:00 committed by Daniel Roe
parent 73761dade5
commit b66858477b
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B
2 changed files with 5 additions and 1 deletions

View File

@ -56,6 +56,10 @@ First, upgrade Nuxt to the [latest release](https://github.com/nuxt/nuxt/release
Then you can set your `compatibilityVersion` to match Nuxt 4 behavior:
::note
For now, you need to define the compatibility version in each layer that opts into Nuxt 4 behavior. This will not be required after Nuxt 4 is released.
::
```ts twoslash [nuxt.config.ts]
export default defineNuxtConfig({
future: {

View File

@ -40,7 +40,7 @@ There is also a `future` namespace for early opting-in to new features that will
### compatibilityVersion
::important
This configuration option is available in Nuxt v3.12+.
This configuration option is available in Nuxt v3.12+. Please note, that for now, you need to define the compatibility version in each layer that opts into Nuxt 4 behavior. This will not be required after Nuxt 4 is released.
::
This enables early access to Nuxt features or flags.