[]previous and next page

createDuskManifest

Builds the contents of dusk-manifest.json.

Builds the contents of dusk-manifest.json.

Import#

ts
import { createDuskManifest } from "@shadow-js/dusk/vite";

Signature#

ts
function createDuskManifest(input: {
  readonly buildId: string;
  readonly assets: BuiltAssets;
  readonly scan: ScanResult;
  readonly serverFns: readonly ServerFnRecord[];
  readonly root: string;
  readonly prerendered: readonly string[];
  readonly staticPages?: readonly StaticPage[];
  readonly adapter?: { readonly name: string; readonly outDir: string };
  /** The build's assets folder. Default `assets`. */
  readonly assetsDir?: string;
}): DuskManifest

Parameters#

Name Description
input Assets, scan, server functions and the project root (paths are made relative). adapter is the adapter the build runs, when there is one.

Returns#

The manifest object; serialize it with JSON.stringify(manifest, null, 2).

Examples#

ts
JSON.stringify(createDuskManifest({ buildId, assets, scan, serverFns, root, prerendered }), null, 2);