DeploymentOptions
Build identity, manifest URL and optional recovery policy.
Compatibility
Import from @kasperrt/smolter/react/client @kasperrt/smolter/preact/client
Signature
interface DeploymentOptions {
version: string;
/** Generated shared application fingerprint; omitted for legacy manifests. */
shared?: string;
/** Generated route dependency fingerprints, in route matching order. */
routes?: { path: string; fingerprint: string }[];
/** Minimum interval between completed routine manifest checks (default 30 seconds). Chunk failures bypass it. */
checkInterval?: number;
manifestURL: string;
/** Maximum duration of a manifest request; ordinary navigation does not wait for it. */
timeout?: number;
/** Override document navigation, for example to ask about unsaved changes. */
reload?: (destination: URL) => void;
}Fields
version identifies the loaded browser graph. Generated shared and routes fingerprints allow compatible destinations to keep client navigation. manifestURL points to the deployed manifest. timeout defaults to 2000 ms. checkInterval defaults to 30000 ms for successful checks with generated metadata; chunk failures bypass it. reload overrides document navigation. Legacy version-only metadata remains supported conservatively. Use generated metadata rather than inventing route fingerprints.
import type { DeploymentOptions } from "@kasperrt/smolter/preact/client";
const policy: DeploymentOptions = {
version: "build-identifier",
manifestURL: "/smolter-manifest.json",
timeout: 2000,
};Fields
version
version: string;routes
routes?: { path: string; fingerprint: string }[];Generated route dependency fingerprints, in route matching order.
checkInterval
checkInterval?: number;Minimum interval between completed routine manifest checks (default 30 seconds). Chunk failures bypass it.
manifestURL
manifestURL: string;timeout
timeout?: number;Maximum duration of a manifest request; ordinary navigation does not wait for it.
reload
reload?: (destination: URL) => void;Override document navigation, for example to ask about unsaved changes.