Build and Deploy

vext build compiles server output and frontend output in one command.

Output

When frontend is enabled, production output includes:

dist/
  server/
  client/
    index.html
    manifest.json
    render-manifest.json
    deploy-manifest.json
    size-report.json
    assets/

vext start serves the built client assets and uses render-manifest.json for SSR. In production, startup fails before listening when index.html, render-manifest.json, route asset metadata, or the server renderer file is missing or invalid; run vext build again to regenerate them.

Build Command

vext build

To upload static assets after build:

vext build --upload-assets

Or run upload separately:

vext deploy assets --dry-run
vext deploy assets

vext deploy assets accepts options only and rejects extra positional arguments. Options that require values must receive non-option values; for example, --manifest --dry-run and --target-dir --dry-run fail instead of treating the next flag as a path.

Deploy Manifest

deploy-manifest.json records static assets that can be uploaded:

  • JS and CSS assets
  • imported images/fonts/media
  • copied public/** files
  • content type
  • sha256
  • SRI for eligible assets
  • upload key and public URL

HTML is not uploaded by default because SSR still belongs to the server runtime.

Incremental Upload

The upload state file stores known sha256 values. Unchanged assets are skipped, so images and fonts are not uploaded again on every release.

Keep stateFile outside the frontend outDir because build output is normally cleaned.

Configuration

frontend: {
  deploy: {
    assetBaseUrl: "https://cdn.example.com/my-app/",
    integrity: true,
    upload: {
      enabled: true,
      adapter: "filesystem",
      targetDir: ".vext/frontend-cdn",
      publicBaseUrl: "https://cdn.example.com/my-app/",
      prefix: "my-app",
      stateFile: ".vext/deploy/frontend-assets-state.json",
      exclude: ["**/*.map"],
    },
  },
}