@nuxt/schema-nightly 5.0.0-29662437.89c933ea → 5.0.0-29664396.5668d45c
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.
- package/dist/index.d.mts +26 -0
- package/dist/index.mjs +12 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2451,6 +2451,32 @@ interface ConfigSchema {
|
|
|
2451
2451
|
*/
|
|
2452
2452
|
nitroAutoImports: boolean;
|
|
2453
2453
|
/**
|
|
2454
|
+
* Enable SSR streaming to improve Time to First Byte (TTFB).
|
|
2455
|
+
*
|
|
2456
|
+
* When enabled, the server sends the HTML shell (head, styles, preload hints)
|
|
2457
|
+
* immediately and streams the rendered body content progressively.
|
|
2458
|
+
*
|
|
2459
|
+
* Streaming is automatically disabled for bot/crawler user agents to ensure
|
|
2460
|
+
* search engines receive fully-rendered HTML. You can opt a route out of
|
|
2461
|
+
* streaming via `routeRules` with `streaming: false`.
|
|
2462
|
+
*
|
|
2463
|
+
* Set to `true` to enable with defaults, or pass an object to configure options.
|
|
2464
|
+
*
|
|
2465
|
+
* @default false
|
|
2466
|
+
* @see https://github.com/nuxt/nuxt/issues/4753
|
|
2467
|
+
*/
|
|
2468
|
+
ssrStreaming: boolean | {
|
|
2469
|
+
enabled?: boolean;
|
|
2470
|
+
/**
|
|
2471
|
+
* A regular expression matching bot/crawler user agents. Requests matching
|
|
2472
|
+
* the pattern are served fully-buffered (non-streamed) responses for SEO
|
|
2473
|
+
* safety.
|
|
2474
|
+
*
|
|
2475
|
+
* @default /bot\b|crawl|spider|slurp|facebookexternalhit|google\b|bing\b|yandex\b|baidu\b|duckduck/i
|
|
2476
|
+
*/
|
|
2477
|
+
botRegex?: RegExp;
|
|
2478
|
+
};
|
|
2479
|
+
/**
|
|
2454
2480
|
* Whether `callHook` always returns a `Promise`, wrapping synchronous hook results.
|
|
2455
2481
|
*
|
|
2456
2482
|
* Hookable v6 may return `void` instead of `Promise<void>` when there are no registered
|
package/dist/index.mjs
CHANGED
|
@@ -722,6 +722,18 @@ var experimental_default = defineResolvers({
|
|
|
722
722
|
nitroAutoImports: { $resolve: async (val, get) => {
|
|
723
723
|
return typeof val === "boolean" ? val : await get("future.compatibilityVersion") < 5;
|
|
724
724
|
} },
|
|
725
|
+
ssrStreaming: { $resolve(val) {
|
|
726
|
+
const defaultBotRegex = /bot\b|crawl|spider|slurp|facebookexternalhit|google\b|bing\b|yandex\b|baidu\b|duckduck/i;
|
|
727
|
+
const obj = val !== null && typeof val === "object" ? val : null;
|
|
728
|
+
if (!(val === true || obj !== null && obj.enabled !== false)) return {
|
|
729
|
+
enabled: false,
|
|
730
|
+
botRegex: defaultBotRegex
|
|
731
|
+
};
|
|
732
|
+
return {
|
|
733
|
+
enabled: true,
|
|
734
|
+
botRegex: (obj === null || obj === void 0 ? void 0 : obj.botRegex) instanceof RegExp ? obj.botRegex : defaultBotRegex
|
|
735
|
+
};
|
|
736
|
+
} },
|
|
725
737
|
asyncCallHook: { $resolve: async (val, get) => {
|
|
726
738
|
return typeof val === "boolean" ? val : await get("future.compatibilityVersion") < 5;
|
|
727
739
|
} },
|