Interface: TransformContext

View as Markdown

Defined in: index.ts:208

The second argument to transform.

Properties

collection

collection: TName;

Defined in: index.ts:210

The name of the collection, eg posts.


dev

dev: boolean;

Defined in: index.ts:219

Whether the Vite dev server is running, as opposed to a build.

transform: ({ metadata }, { dev, skip }) => (metadata.draft && !dev ? skip("draft") : {})

skip

skip: (reason?: string) => Skipped;

Defined in: index.ts:228

Leaves this entry out of the collection. Return its result.

transform: ({ metadata }, { skip }) => (metadata.draft ? skip("draft") : {})