Interface: TransformContext

Defined in: index.ts:209

The second argument to transform.

Properties

collection

collection: TName;

Defined in: index.ts:211

The name of the collection, eg posts.


dev

dev: boolean;

Defined in: index.ts:220

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:229

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

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