Vite Plugin / delivery: StaticViteDocumentOptions
Functions, types, and exports for Vite Plugin / delivery: StaticViteDocumentOptions.
Page outline
Options for a post-prerender static document. Every script is approved by the SHA-256 digest of its complete original element, in document order.
import type { StaticViteDocumentOptions } from "@palamedes/vite-plugin/delivery"
type StaticViteDocumentOptions = {
readonly html: string;
readonly allowedScripts: readonly string[];
/** Explicit byte/count bounds for all executable and data script elements. */
readonly scriptLimits: {
readonly maxCount: number;
readonly maxElementBytes: number;
readonly maxTotalBytes: number;
};
readonly locale: {
readonly kind: "document";
} | {
readonly kind: "fallback";
readonly policyModule: string;
};
};
Properties
| Name | Type | Required | Description |
|---|---|---|---|
html | string | Yes | Readonly. |
allowedScripts | readonly string[] | Yes | Readonly. |
scriptLimits | { readonly maxCount: number; readonly maxElementBytes: number; readonly maxTotalBytes: number } | Yes | Readonly. Explicit byte/count bounds for all executable and data script elements. |
locale | { readonly kind: "document" } | { readonly kind: "fallback"; readonly policyModule: string } | Yes | Readonly. |
Last updated: November 21, 2026