@nuxt/docs-nightly 5.0.0-29758188.0ff9da9b → 5.0.0-29758236.ea5ea6f8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -571,6 +571,35 @@ export default defineNuxtConfig({
571
571
 
572
572
  This allows modules to access additional metadata from the page metadata in the build context. If you are using this within a module, it's recommended also to [augment the `NuxtPage` types with your keys](/docs/4.x/directory-structure/app/pages#typing-custom-metadata).
573
573
 
574
+ ## extractSerializablePageMeta
575
+
576
+ Enabled by default when `future.compatibilityVersion` is `5` or higher.
577
+
578
+ By default, Nuxt only reads a fixed list of `definePageMeta()` keys at build time (plus anything in `extraPageMetaExtractionKeys`); everything else is resolved at runtime from a separate module generated per page. With this option, Nuxt writes every JSON-serializable property straight into the generated route record instead.
579
+
580
+ When every property of a page's `definePageMeta()` can be resolved statically, the route no longer imports that page's meta module at all, which removes one module per page from the dev module graph.
581
+
582
+ ```vue
583
+ <script lang="ts" setup>
584
+ definePageMeta({
585
+ layout: { name: 'admin', props: { collapsed: true } },
586
+ title: 'Dashboard',
587
+ })
588
+ </script>
589
+ ```
590
+
591
+ Properties whose values cannot be serialized (functions, variable references, spreads, computed keys) are unaffected and still resolved at runtime.
592
+
593
+ This has no effect when [`scanPageMeta`](#scanpagemeta) is `false`, as the route record does not override the meta module in that case.
594
+
595
+ ```ts twoslash [nuxt.config.ts]
596
+ export default defineNuxtConfig({
597
+ experimental: {
598
+ extractSerializablePageMeta: false,
599
+ },
600
+ })
601
+ ```
602
+
574
603
  ## navigationRepaint
575
604
 
576
605
  Wait for a single animation frame before navigation, which gives an opportunity for the browser to repaint, acknowledging user interaction.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/docs-nightly",
3
- "version": "5.0.0-29758188.0ff9da9b",
3
+ "version": "5.0.0-29758236.ea5ea6f8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",