@brickkit/cli/vite
The Vite plugin that generates the typed client contract and serves the dashboard.
@brickkit/cli/vite exports 2 names: 1 function, 1 interface.
import { brickClient } from "@brickkit/cli/vite";Functions
| Function | Description |
|---|---|
brickClient | Load a BrickApp through Vite's server module graph, including dependency HMR. |
brickClient
function brickClient(options: BrickClientPluginOptions): PluginLoad a BrickApp through Vite's server module graph, including dependency HMR.
Parameters
| Name | Type | Description |
|---|---|---|
options | BrickClientPluginOptions |
Returns Plugin
Source: packages/cli/src/vite.ts:33
Interfaces
BrickClientPluginOptions
interface BrickClientPluginOptionsProperties
| Name | Type | Description |
|---|---|---|
entry | string | Any module whose default export is a BrickApp; do not call listen() there. |
output? | string | Generated browser contract, relative to the Vite root (default _brick/contract.ts). |
dashboard? | { port?: number; historyDays?: number } | false | Local 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