@brickkit/cli/compiler
Emit the JavaScript module of a compiled application's route handlers, and each handler factory, for an ahead-of-time build.
@brickkit/cli/compiler exports 2 names: 2 functions.
import { emitCompiledApplication, emitHandlerFactory } from "@brickkit/cli/compiler";Functions
| Function | Description |
|---|---|
emitCompiledApplication | The routes.js module of a build: the compiled IR the built server checks its app against. |
emitHandlerFactory | A route's handler factory for brick build: it binds the runtime pipeline, so no framework logic is emitted. |
emitCompiledApplication
function emitCompiledApplication(ir: BrickIR, _runtimeImport?: string): stringThe routes.js module of a build: the compiled IR the built server checks its app against.
Parameters
| Name | Type | Description |
|---|---|---|
ir | BrickIR | |
_runtimeImport? | string |
Returns string
Source: packages/cli/src/compiler.ts:13
emitHandlerFactory
function emitHandlerFactory(_route: RouteIR): stringDeprecated.
brick buildno longer emits handler factories; built servers bind routes at startup.
A route's handler factory for brick build: it binds the runtime pipeline, so no framework logic is emitted.
Parameters
| Name | Type | Description |
|---|---|---|
_route | RouteIR |
Returns string
Source: packages/cli/src/compiler.ts:8