smolter
Types

DeploymentPluginOptions

Configure the public production manifest URL.

Compatibility

ReactServer/build API, not a browser import.
React SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
PreactServer/build API, not a browser import.
Preact SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.

Import from @kasperrt/smolter/react/vite @kasperrt/smolter/preact/vite

Signature

interface DeploymentPluginOptions {
  /** Public URL, optionally on an asset host. Defaults to Vite base + smolter-manifest.json. */
  manifestURL?: string;
  /** Change when independently deployed server contracts become incompatible. */
  compatibility?: string;
}

manifestURL

Override the URL read by watchDeployment. The emitted filename stays smolter-manifest.json; your host maps it to the configured URL. Omit the override for an absolute Vite base, or set it explicitly for multiple applications, a CDN or relative bases.

import type { DeploymentPluginOptions } from "@kasperrt/smolter/preact/vite";

const options: DeploymentPluginOptions = {
  manifestURL: "/admin/smolter-manifest.json",
};

Server compatibility

compatibility contributes to build and shared fingerprints. Change it for incompatible independently deployed server contracts or external runtime configuration that the browser graph cannot observe. It does not substitute for retaining old assets or consistent deployment ordering.

deploymentPlugin({ compatibility: "server-contract-v2" });

When to change the compatibility key

Usually no key is needed: changes visible to the browser build already change its fingerprints. Use a stable contract identifier only for incompatible changes outside that graph, then rebuild and deploy the frontend and its manifest with the new key. For example, an independently deployed API changing { name } to { displayName } is invisible to an unchanged browser build. A new key makes old tabs eligible for recovery; the newly deployed frontend must already understand the new response. It does not repair incompatible code, detect backend deployments automatically, or replace coordinated rollout and backward compatibility. Do not change the key for ordinary data updates.

deploymentPlugin({ compatibility: "profile-contract-v2" });

Fields

manifestURL

manifestURL?: string;

Public URL, optionally on an asset host. Defaults to Vite base + smolter-manifest.json.

compatibility

compatibility?: string;

Change when independently deployed server contracts become incompatible.

View implementation ↗