brick.ts

@brickkit/cli/vite

The Vite plugin that generates the typed client contract and serves the dashboard.

llms.txt

@brickkit/cli/vite exports 3 names: 1 function, 2 interfaces.

import { brickClient } from "@brickkit/cli/vite";

Functions

FunctionDescription
brickClientLoad a BrickApp through Vite's server module graph, including dependency HMR.

brickClient

function brickClient(options: BrickClientPluginOptions): Plugin

Load a BrickApp through Vite's server module graph, including dependency HMR.

Parameters

NameTypeDescription
optionsBrickClientPluginOptions

Returns Plugin

Source: packages/cli/src/vite.ts:42

Interfaces

BrickClientPluginOptions

interface BrickClientPluginOptions

Properties

NameTypeDescription
entrystringAny module whose default export is a BrickApp; do not call listen() there.
output?stringGenerated browser contract, relative to the Vite root (default _brick/contract.ts).
dashboard?| ({ port?: number; historyDays?: number } & DashboardExtensionOptions) | falseLocal dashboard for the app's requests, traces, errors, and reloads, served during vite dev (default: on at port 9400). Apps must pass telemetry: true to brick() to record requests. historyDays is how long finished requests are kept in .brick/ (default 90, 0 for none). Set to false to disable. extension (relative to the Vite root) and theme customise it, as in brick dev.

Source: packages/cli/src/vite.ts:23

DashboardTheme

interface DashboardTheme

Token values for the dashboard's light and dark themes, its radius and fonts.

Properties

NameTypeDescription
light?Record<string, string>Colour tokens in light mode, by name: { primary: "oklch(0.55 0.2 260)" }.
dark?Record<string, string>Colour tokens in dark mode.
radius?stringThe base corner radius, such as "0.5rem".
fonts?{ sans?: string; mono?: string }CSS font stacks. The page must be able to load the font.

Source: packages/cli/src/dashboard-extension.ts:21

On this page

Generated from the JSDoc above each export. Edit the comment there.