brick.ts

@brickkit/cli/vite

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

llms.txt

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

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

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 } | 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.

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

On this page

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