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:
vite buildcompiles the React client into static assets - the entry bundle, code-split route chunks, CSS, and hashed filenames for caching.nitro buildcompiles 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.
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:
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:
| File | Contents |
|---|---|
.bionicjs/hono.ts | A Hono router + AppRouter type built from server/api/*.ts — generated, but not mounted yet |
.bionicjs/api-client.ts | The typed hc<AppRouter> client exported as api — inert until the router is mounted |
.bionicjs/server.ts | The 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.
13 / 25