Skip to main content
The Configuration interface defines all available options for configuring electron-builder. Source: packages/app-builder-lib/src/configuration.ts:202

Interface Definition

The Configuration interface extends:
  • CommonConfiguration - Common configuration options
  • PlatformSpecificBuildOptions - File patterns and build options
  • Hooks - Lifecycle hooks

Application Metadata

string | null
default:"com.electron.${name}"
The application ID. Used as CFBundleIdentifier for macOS and Application User Model ID for Windows (NSIS only). It is strongly recommended that an explicit ID is set.Example: "com.mycompany.myapp"
string | null
The product name for your executable. Allows spaces and special characters not allowed in the name property. If not specified, uses productName from top-level package.json, or falls back to name.Example: "My Application"
The human-readable copyright line for the app.Example: "Copyright © 2024 My Company"

Framework Configuration

string | null
The version of Electron you are packaging for. Defaults to version of electron, electron-prebuilt, or electron-prebuilt-compile dependency.Example: "28.0.0"
ElectronDownloadOptions
Options for downloading Electron.
ElectronBrandingOptions
The branding used by Electron’s distributables. Needed if a fork has modified Electron’s BRANDING.json file.
string | null
default:"electron"
The framework name. One of electron, proton, or libui.
boolean
Whether to use electron-compile. Defaults to true if electron-compile is in dependencies, false if in devDependencies or not specified.

Directories

MetadataDirectories | null
Directory configuration.

Build Configuration

Array<string> | string | null
Name of a built-in preset (currently only react-cra) or paths to config files to extend. Automatically set to react-cra if react-scripts is in dependencies. Set to null to disable.
boolean
default:"false"
Whether to build native dependencies from source.
boolean
default:"false"
Whether to execute node-gyp rebuild before packaging.
boolean
default:"true"
Whether to rebuild native dependencies before packaging.
'legacy' | 'sequential' | 'parallel' | null
default:"sequential"
Use legacy app-builder binary for installing native dependencies, or @electron/rebuild in sequential or parallel compilation modes.
Array<string> | string | null
Additional command line arguments to use when installing app native deps.

Version Configuration

string | null
The build number. Maps to --iteration flag for FPM on Linux. Falls back to BUILD_NUMBER, TRAVIS_BUILD_NUMBER, APPVEYOR_BUILD_NUMBER, CIRCLE_BUILD_NUM, or BUILD_BUILDNUMBER environment variables.
string | null
The build version. Maps to CFBundleVersion on macOS and FileVersion on Windows. Defaults to version. If not defined but buildNumber is, uses version.buildNumber.

Platform-Specific Options

macOS

MacConfiguration | null
Options for building macOS targets.
MasConfiguration | null
Mac Application Store (MAS) options.
MasConfiguration | null
MAS development options for mas-dev target.
DmgOptions | null
macOS DMG target options.
PkgOptions | null
macOS PKG target options.

Windows

WindowsConfiguration | null
Options for building Windows targets.
NsisOptions | null
NSIS installer options.
NsisWebOptions | null
NSIS web installer options.
PortableOptions | null
Portable app options.
AppXOptions | null
AppX package options.
MsiOptions | null
MSI installer options (private).
SquirrelWindowsOptions | null
Squirrel.Windows installer options.

Linux

LinuxConfiguration | null
Options for building Linux targets.
DebOptions | null
Debian package options.
SnapOptions | null
Snap package options.
AppImageOptions | null
AppImage options.
FlatpakOptions | null
Flatpak options.
LinuxTargetSpecificOptions | null
Pacman package options.
LinuxTargetSpecificOptions | null
RPM package options.

Code Signing

boolean
default:"false"
Whether to fail if the app is not code signed.
boolean
Whether to download the alternate FFmpeg library from Electron’s release assets and replace the default FFmpeg library prior to signing.

Advanced Options

any
Inject properties to package.json. Can override any package.json fields.Example:
boolean
default:"false"
Whether to include PDB files (Windows debug symbols).
boolean
default:"true"
Whether to remove scripts field from package.json files.
boolean
default:"true"
Whether to remove keywords field from package.json files.
boolean
default:"false"
Whether to disable sanity check of asar package. Useful for custom Electron forks with encrypted integrity validation.

Electron Fuses

FuseOptionsV1 | null
Options to pass to @electron/fuses. See Electron Fuses.

Toolsets

ToolsetConfig | null
Configuration of toolsets utilized by electron-builder.

Concurrency

Concurrency | null
Experimental configuration for concurrent builds.

Example Configuration

See Also