docs: added bridge macros.pageMeta and typescript.esbuild option (#26136)

This commit is contained in:
Ryota Watanabe 2024-03-08 16:21:56 +09:00 committed by GitHub
parent 8f7724133f
commit a9af9e0288
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 1 deletions

View File

@ -22,6 +22,16 @@ export default defineNuxtConfig({
// Enable Nuxt 3 compatible useHead
// meta: true,
// Enable definePageMeta macro
// macros: {
// pageMeta: true
// },
// Enable transpiling TypeScript with esbuild
// typescript: {
// esbuild: true
// },
// -- Default features --
// Use legacy server instead of Nitro

View File

@ -42,7 +42,24 @@ export default defineNuxtRouteMiddleware((to) => {
Use of `defineNuxtRouteMiddleware` is not supported outside of the middleware directory.
::
::note
## definePageMeta
You can also use [`definePageMeta`](https://nuxt.com/docs/api/utils/define-page-meta) in Nuxt Bridge.
You can be enabled with the `macros.pageMeta` option in your configuration file
```ts [nuxt.config.ts]
import { defineNuxtConfig } from '@nuxt/bridge'
export default defineNuxtConfig({
bridge: {
macros: {
pageMeta: true
}
}
})
```
::note
But only for `middleware` and `layout`.
::