Docs

Configuration (electron.config.ts)

This page orients you in electron.config.ts — what's always on, what's opt-in, and where each decision area lives. For the full field-level reference, follow the links into configuration/.

Where it lives

electron.config.ts exports a default ElectronConfig object (type from @devioarts/electron), scaffolded by dae init in the project root. Every feature is either always safe to leave on, or off until you opt in — bundle size isn't a concern here since none of this runs in the browser bundle, only in the Electron main process.

Always on (no config needed)

Window control (quit/minimize/maximize/fullscreen/...), screen/display info, power monitor + power-save-blocker, native theme, badge count, progress bar, native file drag-out, secureStorage, protocols, session, externalCommands (inert with no configured aliases), windows, global shortcuts API, menu-action/error listeners, clipboard, notifications, systemPreferences, crashReporter.getLastCrashReport(), utilityProcess (inert with no configured tasks).

Security defaults worth knowing

Unlike a plain browser, Electron's own default is to silently allow every permission request and let any window navigate or pop up anywhere. This package overrides both unconditionally — permissions are denied unless allowlisted, and the main window can't navigate off-origin or open unrestricted windows. See Security configuration for the config keys, and Architecture for the mechanism.

Configuration areas

Area Covers Page
App & lifecycle Identity (appId/appName), dev server URL, app.loadMode (file/protocol/server), window persistence, deep linking, auto-updater, crash reporting configuration/app.md
Security Permission allowlist, CSP, secureStorage key hashing configuration/security.md
UI Window sizing, application/context/tray/dock menus, Jump List, splash screen configuration/ui.md
Processes externalCommands (run an OS executable) vs utilityProcesses (run your own Node.js worker) configuration/processes.md
Plugins Per-plugin config, keyed by plugin name via PluginConfigMap declaration merging Plugins

Minimal first-run config

import type { ElectronConfig } from '@devioarts/electron';

const config: ElectronConfig = {
  appId: 'com.example.app',
  appName: 'My App',

  dev: {
    url: 'http://localhost:5173',
    openDevTools: true,
  },

  app: {
    loadMode: 'file',
    singleInstance: true,
    persistWindowState: true,
  },

  browserWindow: {
    width: 1200,
    height: 800,
  },
};

export default config;

This is what dae init scaffolds (templates/electron.config.ts). playground/electron.config.ts is a working example that additionally sets appId: 'com.devioarts.electron.demo', appName: 'electron-demo', and turns on ui.appMenu, ui.contextMenu, ui.jumpList — see Playground demo app.

Next: Usage for the window.Electron API these settings unlock.

Last updated on July 17, 2026