Skip to content

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

NameTypeRequiredDescription
htmlstringYesReadonly.
allowedScriptsreadonly string[]YesReadonly.
scriptLimits{ readonly maxCount: number; readonly maxElementBytes: number; readonly maxTotalBytes: number }YesReadonly. Explicit byte/count bounds for all executable and data script elements.
locale{ readonly kind: "document" } | { readonly kind: "fallback"; readonly policyModule: string }YesReadonly.

Source entry on GitHub

Last updated: November 21, 2026