mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
docs: added bridge macros.pageMeta
and typescript.esbuild
option (#26136)
This commit is contained in:
parent
8f7724133f
commit
a9af9e0288
@ -22,6 +22,16 @@ export default defineNuxtConfig({
|
|||||||
// Enable Nuxt 3 compatible useHead
|
// Enable Nuxt 3 compatible useHead
|
||||||
// meta: true,
|
// meta: true,
|
||||||
|
|
||||||
|
// Enable definePageMeta macro
|
||||||
|
// macros: {
|
||||||
|
// pageMeta: true
|
||||||
|
// },
|
||||||
|
|
||||||
|
// Enable transpiling TypeScript with esbuild
|
||||||
|
// typescript: {
|
||||||
|
// esbuild: true
|
||||||
|
// },
|
||||||
|
|
||||||
// -- Default features --
|
// -- Default features --
|
||||||
|
|
||||||
// Use legacy server instead of Nitro
|
// Use legacy server instead of Nitro
|
||||||
|
@ -42,7 +42,24 @@ export default defineNuxtRouteMiddleware((to) => {
|
|||||||
Use of `defineNuxtRouteMiddleware` is not supported outside of the middleware directory.
|
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 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`.
|
But only for `middleware` and `layout`.
|
||||||
::
|
::
|
||||||
|
Loading…
Reference in New Issue
Block a user