Skip to content

Commit

Permalink
docs: added bridge macros.pageMeta and typescript.esbuild option (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wattanx committed Mar 8, 2024
1 parent 8f77241 commit a9af9e0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
10 changes: 10 additions & 0 deletions docs/6.bridge/10.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 18 additions & 1 deletion docs/6.bridge/4.plugins-and-middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
::

0 comments on commit a9af9e0

Please sign in to comment.