bakeServerConfig
The server part of a validated configuration, as plain JSON.
The server part of a validated configuration, as plain JSON. The build writes it into the server bundle, and the handler reads it at start. Build-only keys (adapter, prerender) are not part of it.
Import#
ts
import { bakeServerConfig } from "@shadow-js/dusk/vite";
Signature#
ts
function bakeServerConfig(config: DuskConfig): BakedServerConfig
Parameters#
| Name | Description |
|---|---|
config |
A validated configuration (see validateDuskConfig). |
Returns#
The server configuration.
Throws#
- TypeError when a value is not plain data (a function, a class instance), with its path.
Examples#
ts
import { bakeServerConfig, validateDuskConfig } from "@shadow-js/dusk/vite";
bakeServerConfig(validateDuskConfig({ deploymentId: "rel-42" })).deploymentId; // "rel-42"