@gomani/build
v0.3.0
Published
Production build: HTML + island chunks + route manifest + budget report.
Maintainers
Readme
@gomani/build
The production build for Gomani: static HTML per route + per-island chunks + a route→assets manifest, gated by budgets.
build() composes the whole pipeline:
- Scans
app/routes/**andapp/islands/**. - Code-splits the client with esbuild into a shared runtime (
boot) + one chunk per island. - Static-renders every route (dynamic routes via
staticPaths) to zero-JS HTML, injecting the island manifest + boot script only where a page has islands. - Copies
public/verbatim. - Emits
dist/gomani-manifest.json(each route → the eager assets it transfers). - Runs the budget gate (
@gomani/budget) against your budget config and fails the build on any violation (P1) — the dependency that quietly doubled a route's weight is caught here, not in production.
import { build } from '@gomani/build';
const result = await build({ root: process.cwd() });
// result.report is the budget report; build() throws if a route is over budget.Usually invoked as gomani build.
License
MIT © Venancio Gomani / Kwacha Kulture.
