Wocart

@wocart/theme v4.1.0


@wocart/theme / astro / themeManifestEndpoint

Function: themeManifestEndpoint()

themeManifestEndpoint(theme): () => Response

The theme's manifest as a prerendered endpoint, the file a release and an editor read (THEME_MANIFEST_PATH):

TypeScriptCode
// src/pages/wocart-theme.json.ts import { themeManifestEndpoint } from "@wocart/theme/astro"; import { theme } from "../theme/theme"; export const prerender = true; export const GET = themeManifestEndpoint(theme);

The manifest is derived and validated when the module loads, so a theme whose manifest is invalid fails its build instead of shipping it.

Parameters

theme

ThemeDefinition

Returns

() => Response