Build and dev/The build pipeline

The build pipeline

One artifact, prerendering, and deployment targets.

The Build

The bionicjs build command is a two-step process, mirrored on the two engines the framework composes:

  1. vite build compiles the React client into static assets - the entry bundle, code-split route chunks, CSS, and hashed filenames for caching.
  2. nitro build compiles the server routes - the h3 handlers, the generated Hono RPC router, and the plugin exports - then copies the Vite output into Nitro's public directory.
bionicjs build
1$ bionicjs build
2
3✓ Build complete in 1.8s

The result is a single deployable server artifact in the .output/ directory, capable of serving both the API and the React SPA fallback. Nothing else needs to be deployed - the client bundle is inside the server output.

One artifact

Because Nitro serves the static files, the build produces a single deployable. Deploying the app is deploying the server:

.output/ structure
1.output/
2|-- server/
3|   `-- index.mjs         # the Nitro server (API + SPA fallback)
4|-- public/
5|   |-- index.html         # the Vite client entry
6|   `-- assets/            # hashed JS/CSS chunks

There is nothing to configure in a CI pipeline beyond building and running .output/server/index.mjs. The same artifact runs locally, in a container, on a VPS, or on any platform Nitro can target.

What gets generated

Alongside the client and server bundles, the build writes the generated boundary into .bionicjs/. These are the same modules the dev server serves virtually - on disk during a build, in memory during dev:

FileContents
.bionicjs/hono.tsA Hono router + AppRouter type built from server/api/*.ts — generated, but not mounted yet
.bionicjs/api-client.tsThe typed hc<AppRouter> client exported as api — inert until the router is mounted
.bionicjs/server.tsThe generated auth / db / ai / jobs server exports

Prerendering and targets

Nitro's deployment targets carry over unchanged. Because the client is static assets and the server is Web-Standards based, BionicJS can emit the same build for Node.js, Cloudflare Workers, Deno, or Bun preset.

ⓘ
The BionicJS build does not compile Python. Python code is deployed alongside the server artifact - either in the same container for a single-unit deployment, or as a separate service for the microservices model.