Skip to content

Search the guides, deployment pages, and API reference.

createAssetManifest

import { createAssetManifest } from "@pitlane/assets/build";
function createAssetManifest(build): BuildAssetsManifest;

Converts a bundler's normalized output into the manifest createAssetResolver reads.

It walks each environment's static chunk graph to record, for every source module, its modulepreload URLs (its chunk first, then dependencies shallowest first) and stylesheets (a dependency's before its importer's). Dynamic imports are validated and never followed. It reads no files, invents no edges, and generates no import map; serverEnvironment is left for the integration to set per server.

Parameters

build

AssetBuild

Returns

BuildAssetsManifest

Throws

When there is not exactly one client environment, an edge or entry names a missing chunk, a chunk lacks one of its lists, a server environment lists entries, a source key is an absolute file URL, or one source key maps to two URLs.