kumiko build
kumiko build [<path>]Convention-driven production build. Runs Bun.build, the Tailwind
compile, and a public-folder copy, then writes everything to dist/.
In an app, bun run build runs the kumiko-build binary from
@cosmicdrift/kumiko-dev-server. It writes the client to dist/ and the
server bundle to dist-server/.
Path resolution
Section titled “Path resolution”| Source | Used when |
|---|---|
<path> arg | If you pass one |
$INIT_CWD | Yarn sets this, bun run build runs cleanly from any workspace |
process.cwd() | Last resort |
In practice: run bun run build inside an app workspace and it Just Works.
Output
Section titled “Output”✓ build done, 312KB in 1.4s out/ dist/ bundles client.js, server.js static 127 files copiedThe output is what you ship, copy dist/ to a container image or
upload it to your CDN. No further postprocessing required.
Client entries
Section titled “Client entries”An app with one browser entry at src/client.tsx needs no configuration. An
app with more than one entry declares them in package.json:
{ "kumiko": { "clientEntries": [ { "name": "public", "sourceFile": "./src/client-public.tsx" }, { "name": "admin", "sourceFile": "./src/client-admin.tsx", "htmlPath": "./public/admin.html" } ] }}For a single entry at a different path, "kumiko": { "clientEntry": "./src/app.tsx" }
is enough. The build checks the declaration:
namematches^[a-z][a-z0-9-]*$and is unique- two entries cannot share a source file name or an HTML output file
- every
sourceFileexists and stays inside the app directory htmlPathis optional and must end in.htmlclientEntryandclientEntriesare mutually exclusive, and an empty list is an error
The build no longer infers entries from file names. If it finds files such as
src/client-admin.tsx without a declaration, it stops:
[kumiko build] found <files> but no "kumiko.clientEntries" declaration in package.json — production builds no longer infer entries from filenames (fw#2320). Add:followed by a ready-to-paste declaration.
What it does NOT do
Section titled “What it does NOT do”- No code generation.
kumiko codegenis gone; build only bundles. - No DB migrations. Build is read-only against the DB. Use
kumiko schema applyfor that. - No env validation. Build doesn’t read your
.env. The bundle reads it at runtime.
See also
Section titled “See also”- Platform docs, how to deploy the resulting
dist/