Build

Produces a static deploy:

Produces a static deploy:

  1. Copies the SPA dist into <outDir>.
  2. Runs setup(ctx) with mode: 'build'.
  3. Collects RPC dumps for every 'static' and 'query' with dump.inputs / snapshot: true.
  4. 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',
})
OptionDefaultDescription
outDirdist-staticOutput directory (cleared).
distDirdef.clientAssetsSPA dist override (or remote assets).
prettyfalsePretty-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.