Build
Produces a static deploy:
Produces a static deploy:
- Copies the SPA dist into
<outDir>. - Runs
setup(ctx)withmode: 'build'. - Collects RPC dumps for every
'static'and'query'withdump.inputs/snapshot: true. - Writes
__connection.json({ backend: 'static' }) and sharded dumps under__rpc-dump/.
import { createBuild } from 'devframe/adapters/build'
import myDevframe from './my-tool'
await createBuild(myDevframe, {
outDir: 'dist-static',
})| Option | Default | Description |
|---|---|---|
outDir | dist-static | Output directory (cleared). |
distDir | def.clientAssets | SPA dist override (or remote assets). |
pretty | false | Pretty-print dump JSON. |
The RPC client runs read-only. For a custom URL base, build with relative asset paths (vite.base: './').
buildHub() from @devframes/hub/build produces the same kind of deploy for a whole hub: Static builds.