@nuxt/docs-nightly 4.4.0-29545225.86407d3b → 4.4.0-29545716.bcc0d86c
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.
|
@@ -238,12 +238,19 @@ export default defineNuxtConfig({
|
|
|
238
238
|
|
|
239
239
|
## payloadExtraction
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
Controls how payload data is delivered for prerendered and cached (ISR/SWR) pages.
|
|
242
|
+
|
|
243
|
+
- `'client'` - Payload is inlined in HTML for the initial server render, and extracted to `_payload.json` files for client-side navigation. This avoids a separate network request on initial load while still enabling efficient client-side navigation.
|
|
244
|
+
- `true` - Payload is extracted to a separate `_payload.json` file for both the initial server render and client-side navigation.
|
|
245
|
+
- `false` - Payload extraction is disabled entirely. Payload is always inlined in HTML and no `_payload.json` files are generated.
|
|
246
|
+
|
|
247
|
+
The default is `true`, or `'client'` when `compatibilityVersion: 5` is set.
|
|
242
248
|
|
|
243
249
|
```ts twoslash [nuxt.config.ts]
|
|
244
250
|
export default defineNuxtConfig({
|
|
245
251
|
experimental: {
|
|
246
|
-
|
|
252
|
+
// Inline payload in HTML, extract for client-side navigation only
|
|
253
|
+
payloadExtraction: 'client',
|
|
247
254
|
},
|
|
248
255
|
})
|
|
249
256
|
```
|
|
@@ -253,7 +260,7 @@ Payload extraction also works for routes using ISR (Incremental Static Regenerat
|
|
|
253
260
|
```ts twoslash [nuxt.config.ts]
|
|
254
261
|
export default defineNuxtConfig({
|
|
255
262
|
experimental: {
|
|
256
|
-
payloadExtraction:
|
|
263
|
+
payloadExtraction: 'client',
|
|
257
264
|
},
|
|
258
265
|
routeRules: {
|
|
259
266
|
// Payload files will be generated for these cached routes
|