Docs

Deployment (packaging)

How to turn a working dae run setup into a distributable installer: what dae build does, how electron-builder.config.ts controls the output, and what to check when shipping auto-updates, crash reporting, or bundled worker scripts.

Building an installer

npx dae build [mac|win|linux]

This runs, in order:

  1. The renderer build (npm run build in the target project — for the playground this is tsc --noEmit && vite build, producing dist/).
  2. Bundling of electron/main.ts + electron/preload.ts with esbuild.
  3. Packaging via electron-builder, using electron-builder.config.ts plus appId/appName pulled from electron.config.ts — no need to duplicate app identity in both files.

The platform argument defaults to the current OS if omitted.

electron-builder.config.ts

Exports a default electron-builder Configuration. The playground's version:

import type { Configuration } from 'electron-builder';

const config: Configuration = {
  directories: {
    output: 'release',
  },
  files: ['dist/**/*', 'dist-electron/**/*'],
  mac: { target: ['dmg'] },
  win: { target: ['nsis'] },
  linux: { target: ['AppImage'] },
};

export default config;
  • directories.output — where the packaged installer(s) land (release/ here).
  • files — which build outputs get bundled into the app (the renderer's dist/ and the bundled Electron sources' dist-electron/).
  • mac/win/linux — target installer formats. dae build picks the section matching the requested/current platform.

Do not set appId/productName here — dae build passes those through automatically from electron.config.ts's appId/appName.

Shipping extra resources

Anything a processes.externalCommands or processes.utilityProcesses entry needs at runtime (a bundled executable, a worker script) must actually be placed in the packaged app by electron-builder.config.ts, typically via extraResourcesresolve: 'app' / modulePath for these features resolve against resources/app/ in the packaged build, which is a real filesystem path only if the builder config actually copies the file there. See Processes configuration.

Auto-updates

autoUpdater.enabled: true in electron.config.ts turns on electron-updater-backed checks (autoUpdater.channel, autoDownload, autoInstallOnQuit, allowPrerelease, allowDowngrade). The updater is only active in production (app.isPackaged) — it does nothing when running under dae run. The renderer drives it via window.Electron.updater.checkForUpdate(), downloadUpdate(), quitAndInstall(), and on(event, callback).

Crash reporting

Off by default. Set crashReporter.enabled: true (+ optional submitURL, uploadToServer, companyName, extra) to start collecting native crash dumps. Omitting submitURL keeps dumps local-only, readable via window.Electron.crashReporter.getLastCrashReport(), without uploading anywhere.

Last updated on July 17, 2026