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 */
});
Both commands accept all configuration options.