Configuration interface defines all available options for configuring electron-builder.
Source: packages/app-builder-lib/src/configuration.ts:202
Interface Definition
CommonConfiguration- Common configuration optionsPlatformSpecificBuildOptions- File patterns and build optionsHooks- Lifecycle hooks
Application Metadata
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"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
The version of Electron you are packaging for. Defaults to version of
electron, electron-prebuilt, or electron-prebuilt-compile dependency.Example: "28.0.0"Options for downloading Electron.
The branding used by Electron’s distributables. Needed if a fork has modified Electron’s BRANDING.json file.
The framework name. One of
electron, proton, or libui.Whether to use electron-compile. Defaults to
true if electron-compile is in dependencies, false if in devDependencies or not specified.Directories
Directory configuration.
Build Configuration
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.Whether to build native dependencies from source.
Whether to execute
node-gyp rebuild before packaging.Whether to rebuild native dependencies before packaging.
Use
legacy app-builder binary for installing native dependencies, or @electron/rebuild in sequential or parallel compilation modes.Additional command line arguments to use when installing app native deps.
Version Configuration
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.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
Options for building macOS targets.
Mac Application Store (MAS) options.
MAS development options for
mas-dev target.macOS DMG target options.
macOS PKG target options.
Windows
Options for building Windows targets.
NSIS installer options.
NSIS web installer options.
Portable app options.
AppX package options.
MSI installer options (private).
Squirrel.Windows installer options.
Linux
Options for building Linux targets.
Debian package options.
Snap package options.
AppImage options.
Flatpak options.
Pacman package options.
RPM package options.
Code Signing
Whether to fail if the app is not code signed.
Whether to download the alternate FFmpeg library from Electron’s release assets and replace the default FFmpeg library prior to signing.
Advanced Options
Inject properties to
package.json. Can override any package.json fields.Example:Whether to include PDB files (Windows debug symbols).
Whether to remove
scripts field from package.json files.Whether to remove
keywords field from package.json files.Whether to disable sanity check of asar package. Useful for custom Electron forks with encrypted integrity validation.
Electron Fuses
Options to pass to
@electron/fuses. See Electron Fuses.Toolsets
Configuration of toolsets utilized by electron-builder.
Concurrency
Experimental configuration for concurrent builds.