Skip to main content

Programmatic

Ladle can be also used through its JavaScript API:

import serve from "@ladle/react/serve";
import build from "@ladle/react/build";
import preview from "@ladle/react/preview";

await serve({
// config: {}
});
await build({
// config: {}
});
await preview({
// config: {}
});

Explore all config.mjs options.