Production Build
Production Build
Create a production-ready build of your Dex app.
Build
dex build
# or
bun run buildThis executes:
core/bootstrap/build.tsviadexBuild- Route generation (
dex-router generate) - Client bundling with ESM code-splitting (
build/assets/chunks/[name]-[hash].js) and?v=<hash>cache-busting - Server binary compilation (
core/runtime/server/prod.ts→build/server) - SSG prerendering (
dexPrerender) and asset copying
Output Layout
build/
├─ server # Compiled executable server binary
├─ index.html # SPA entry point
├─ __ssg/ # Pre-rendered static pages
├─ assets/ # Static assets and ESM chunks
│ ├─ client.js
│ ├─ styles.css
│ └─ chunks/ # Code-split ESM chunks ([name]-[hash].js)
└─ core/
└─ router/.generated/
├─ routes.ts
└─ layouts.tsRun Locally
cd build
PORT=7990 ./serverSee Also
- Production Server — Running in prod
- Platforms — Deploying to specific platforms