Skip to main content

Interface: CommonConfiguration

Configuration Options

Extended by

Properties

apk?

readonly optional apk?: LinuxTargetSpecificOptions | null

Alpine Linux APK package options. Produces an .apk archive installable via apk add.


appId?

readonly optional appId?: string | null

The application id. Used as CFBundleIdentifier for MacOS and as Application User Model ID for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.

Default

com.electron.${name}

appImage?

readonly optional appImage?: AppImageOptions | null

AppImage options. AppImage is a portable application format that bundles the app and its dependencies into a single self-contained executable that runs on most Linux distributions without installation.


appx?

readonly optional appx?: AppXOptions | null

Windows Store (AppX) package options.


buildDependenciesFromSource?

optional buildDependenciesFromSource?: boolean

Whether to build the application native dependencies from source.

Default

false

buildNumber?

readonly optional buildNumber?: string | null

The build number. Maps to the --iteration flag for builds using FPM on Linux. If not defined, then it will fallback to BUILD_NUMBER or TRAVIS_BUILD_NUMBER or APPVEYOR_BUILD_NUMBER or CIRCLE_BUILD_NUM or BUILD_BUILDNUMBER or CI_PIPELINE_IID env.


buildVersion?

readonly optional buildVersion?: string | null

The build version. Maps to the CFBundleVersion on macOS, and FileVersion metadata property on Windows. Defaults to the version. If buildVersion is not defined and buildNumber (or one of the buildNumber envs) is defined, it will be used as a build version (version.buildNumber).


concurrency?

readonly optional concurrency?: Concurrency | null

[Experimental] Configuration for concurrent builds.


readonly optional copyright?: string | null

The human-readable copyright line for the app.

Default

Copyright © year ${author}

deb?

readonly optional deb?: DebOptions | null

Debian package options. Targets Debian, Ubuntu, and Debian-based distributions. Produces a .deb archive installable via dpkg -i or apt install.


directories?

readonly optional directories?: MetadataDirectories | null

Directories for build resources


dmg?

readonly optional dmg?: DmgOptions | null

macOS DMG options.


downloadAlternateFFmpeg?

readonly optional downloadAlternateFFmpeg?: boolean

Whether to download the alternate FFmpeg library from Electron's release assets and replace the default FFmpeg library prior to signing


electronFuses?

readonly optional electronFuses?: FuseOptionsV1 | null

Options to pass to @electron/fuses Ref: https://github.com/electron/fuses


extraMetadata?

readonly optional extraMetadata?: any

Inject properties to package.json.


flatpak?

readonly optional flatpak?: FlatpakOptions | null

Flatpak options. Flatpak is a sandboxed application distribution format for Linux that runs in a controlled environment and is distributed via Flathub or other Flatpak repositories.


forceCodeSigning?

readonly optional forceCodeSigning?: boolean

Whether to fail if the application is not signed (to prevent unsigned app if code signing configuration is not correct).

Default

false

freebsd?

readonly optional freebsd?: LinuxTargetSpecificOptions | null

FreeBSD package options. Produces a .pkg archive for the FreeBSD pkg package manager.


includePdb?

readonly optional includePdb?: boolean

Whether to include PDB files.

Default

false

linux?

readonly optional linux?: LinuxConfiguration | null

General Linux build options shared across all Linux targets (icon, category, desktop entry, executable name, etc.). Target-specific compression and packaging options live in the per-format interfaces (DebOptions, RpmOptions, PacmanOptions, etc.).


mac?

readonly optional mac?: MacConfiguration | null

Options related to how build macOS targets.


mas?

readonly optional mas?: MasConfiguration | null

MAS (Mac Application Store) options.


masDev?

readonly optional masDev?: MasConfiguration | null

MAS (Mac Application Store) development options (mas-dev target).


msi?

readonly optional msi?: MsiOptions | null

MSI package options.


msiWrapped?

readonly optional msiWrapped?: MsiWrappedOptions | null

MSI-wrapped installer options.


nativeRebuilder?

readonly optional nativeRebuilder?: "legacy" | "sequential" | "parallel" | null

Use legacy app-builder binary for installing native dependencies, or @electron/rebuild in sequential or parallel compilation modes.

Default

sequential

nodeGypRebuild?

readonly optional nodeGypRebuild?: boolean

Whether to execute node-gyp rebuild before starting to package the app.

Don't use npm (neither .npmrc) for configuring electron headers. Use electron-builder node-gyp-rebuild instead.

Default

false

npmArgs?

readonly optional npmArgs?: string | string[] | null

Additional command line arguments to use when installing app native deps.


npmRebuild?

readonly optional npmRebuild?: boolean

Whether to rebuild native dependencies before starting to package the app.

Default

true

nsis?

readonly optional nsis?: NsisOptions | null

NSIS installer options.


nsisWeb?

readonly optional nsisWeb?: NsisWebOptions | null

NSIS web installer options (downloads app package at install time).


p5p?

readonly optional p5p?: LinuxTargetSpecificOptions | null

Solaris IPS package options. Produces a .p5p archive for the Solaris Image Packaging System (pkg).


pacman?

readonly optional pacman?: PacmanOptions | null

Pacman package options. Targets Arch Linux and Arch-based distributions (Manjaro, EndeavourOS, etc.). Produces a .pacman archive installable via pacman -U.


pkg?

readonly optional pkg?: PkgOptions | null

macOS PKG options.


portable?

readonly optional portable?: PortableOptions | null

Portable executable options (no installation required).


productName?

readonly optional productName?: string | null

As name, but allows you to specify a product name for your executable which contains spaces and other special characters not allowed in the name property. If not specified inside of the build configuration, productName property defined at the top level of package.json is used. If not specified at the top level of package.json, name property is used.


removePackageKeywords?

readonly optional removePackageKeywords?: boolean

Whether to remove keywords field from package.json files.

Default

true

removePackageScripts?

readonly optional removePackageScripts?: boolean

Whether to remove scripts field from package.json files.

Default

true

rpm?

readonly optional rpm?: RpmOptions | null

RPM package options. Targets Fedora, Red Hat Enterprise Linux, SUSE, and related distributions. Produces a .rpm archive installable via rpm or dnf.


snap?

readonly optional snap?: SnapOptions | null

Snap package options. Requires snapcraft to be installed.


squirrelWindows?

readonly optional squirrelWindows?: SquirrelWindowsOptions | null

Squirrel.Windows installer options. Requires the electron-builder-squirrel-windows dependency.


toolsets?

readonly optional toolsets?: ToolsetConfig | null

Configuration of toolsets utilized by electron-builder


win?

readonly optional win?: WindowsConfiguration | null

Options related to how build Windows targets.