Skip to main content

Interface: Configuration

The root build configuration object passed to electron-builder.

Extends CommonConfiguration with top-level Electron-specific options, configuration inheritance/presets, and all per-platform build hooks.

Extends​

Properties​

afterAllArtifactBuild?​

readonly optional afterAllArtifactBuild?: string | Hook<BuildResult, string[]> | null

Called after all artifacts across all platforms/architectures have been built.

May return an array of additional file paths that should be treated as publish targets (i.e. uploaded to the configured publisher).

Receives a BuildResult.

Example​

export default async function afterAllArtifactBuild(result) {
return ["/path/to/extra-file.txt"]
}

Inherited from​

Hooks.afterAllArtifactBuild


afterExtract?​

readonly optional afterExtract?: string | Hook<PackContext, void> | null

Called after the prebuilt Electron binary has been extracted to the staging directory but before the app files have been copied into it.

Use this hook to patch or augment the Electron binary itself (e.g. rename helper processes, inject native libraries) before the app payload is laid down on top.

Receives an AfterExtractContext.

Inherited from​

Hooks.afterExtract


afterPack?​

readonly optional afterPack?: string | Hook<PackContext, void> | null

Called after the app files have been copied into the staging directory (and ASAR created if applicable) but before signing and before the output archive/installer is built.

Use this hook to post-process the staged app bundle (e.g. strip debug symbols, inject platform-specific resources).

Receives an AfterPackContext.

Inherited from​

Hooks.afterPack


afterSign?​

readonly optional afterSign?: string | Hook<PackContext, void> | null

Called after code signing but before the signed app is packed into the final distributable format (e.g. before dmg is created from the signed .app).

Use this hook to perform post-sign validation or to add signed resources that are not part of the main app bundle.

Receives an AfterPackContext.

Inherited from​

Hooks.afterSign


allowMissingDependencies?​

readonly optional allowMissingDependencies?: boolean | string[] | null

Whether production dependencies that cannot be resolved during node-module collection are allowed — i.e. whether the build should continue with a warning instead of failing.

During collection every production dependency must resolve to an installed package on disk. A dependency that does not resolve (cannot find path for dependency / dependency not found on disk) is not bundled, which typically breaks the packaged app at runtime with MODULE_NOT_FOUND.

  • false or null (default): the build fails after dependency collection completes, reporting the complete list of missing production dependencies at once.
  • string[]: the listed dependency names are allowed to be missing; any other missing production dependency still fails the build. Entries match the package name of the reported name@version entry (e.g. some-native-module, @scope/pkg), or an exact name@version string to allow only that resolved version to be missing.
  • true: missing production dependencies are only logged as warnings (the electron-builder ≤ 26 behavior).

Missing optional dependencies (declared in optionalDependencies, e.g. fsevents on Linux/Windows, or platform-specific packages) are always allowed and never fail the build.

Independent of ignoredProductionDependencies, which controls which dependencies are excluded from the copied node_modules; this option only controls validation of the collection result.

Default​

false

Inherited from​

CommonConfiguration.allowMissingDependencies


apk?​

readonly optional apk?: LinuxTargetSpecificOptions | null

Alpine Linux APK package options.

Produces an .apk archive installable via apk add --allow-untrusted ./package.apk.

Inherited from​

CommonConfiguration.apk


appId?​

readonly optional appId?: string | null

The application identifier.

Used as CFBundleIdentifier on macOS and as the Application User Model ID on Windows (NSIS target only; Squirrel.Windows does not support custom Application User Model IDs).

It is strongly recommended to set an explicit, reverse-DNS-style identifier (e.g. "com.example.myapp") rather than relying on the generated default.

Default​

com.electron.${name}

Inherited from​

CommonConfiguration.appId


appImage?​

readonly optional appImage?: AppImageOptions | null

AppImage options.

AppImage is a portable application format that bundles the app and its runtime dependencies into a single self-contained executable that runs on most Linux distributions without installation. The produced .AppImage file is executable after chmod +x.

See​

AppImageOptions

Inherited from​

CommonConfiguration.appImage


appx?​

readonly optional appx?: AppXOptions | null

Windows Store (MSIX/AppX) package options.

Produces a .appx or .msix package suitable for distribution through the Microsoft Store or side-loading.

See​

AppXOptions

Inherited from​

CommonConfiguration.appx


appxManifestCreated?​

readonly optional appxManifestCreated?: string | Hook<string, void> | null

Called after the AppX/MSIX manifest XML has been written to the staging directory but before makeappx packages it.

The hook receives the path to the manifest file as a string. Use it to inject custom manifest extensions (capabilities, protocol handlers, etc.) not exposed through AppXOptions.

Inherited from​

Hooks.appxManifestCreated


artifactBuildCompleted?​

readonly optional artifactBuildCompleted?: string | Hook<ArtifactCreated, void> | null

Called when an individual artifact has been successfully built and written to disk.

Use this hook to collect artifact paths, upload to custom destinations, or trigger post-processing steps.

Receives an ArtifactCreated.

Inherited from​

Hooks.artifactBuildCompleted


artifactBuildStarted?​

readonly optional artifactBuildStarted?: string | Hook<ArtifactBuildStarted, void> | null

Called when an individual artifact build starts (e.g. just before a .dmg or .exe is written to disk).

Receives an ArtifactBuildStarted.

Inherited from​

Hooks.artifactBuildStarted


artifactName?​

readonly optional artifactName?: string | null

The artifact file name template. Defaults to ${productName}-${version}.${ext} (some target can have other defaults, see corresponding options).

Inherited from​

PlatformSpecificBuildOptions.artifactName


asar?​

readonly optional asar?: boolean | AsarOptions | null

Whether to package the application's source code into an archive, using Electron's archive format.

Node modules that must be unpacked will be detected automatically. Use AsarOptions.unpack to specify additional files to unpack.

Default​

true

Inherited from​

PlatformSpecificBuildOptions.asar


beforeBuild?​

readonly optional beforeBuild?: string | Hook<BeforeBuildContext, boolean | void> | null

Called before dependencies are installed or native modules are rebuilt.

Return false (or a Promise that resolves to false) to skip the install/rebuild step entirely — useful when you manage node_modules externally (e.g. in a CI pipeline that restores them from cache). When not set, electron-builder proceeds with the normal install/rebuild flow.

If this hook is provided and node_modules is missing, electron-builder will not perform the production-dependencies check.

Receives a BeforeBuildContext.

Inherited from​

Hooks.beforeBuild


beforePack?​

readonly optional beforePack?: string | Hook<PackContext, void> | null

Called immediately before electron-builder begins packing the app for each platform/arch combination.

Use this hook to perform last-minute modifications to source files or build resources before they are read by the packager.

Receives a BeforePackContext.

Inherited from​

Hooks.beforePack


blockmap?​

readonly optional blockmap?: "latest" | "v2" | "v3" | null

Format of the <artifact>.blockmap file published next to installers and update archives, which electron-updater reads for differential downloads. The map is read by the updater already installed in your users' apps, so the format follows electronUpdaterCompatibility (default ">=7"):

  • unset: "v3" when electronUpdaterCompatibility includes only electron-updater 7 and later, else "v2", with a build warning.
  • "v3": a binary block map that electron-updater fetches in parts with HTTP Range requests (only the parts that changed since the installed version), with finer blocks for stored members such as an uncompressed app.asar. Needs electron-updater 7 or later: with an electronUpdaterCompatibility that includes earlier versions, the build fails.
  • "v2": the gzipped JSON block map every electron-updater version reads, downloaded in full on every update; the package and block map are the same as electron-builder 26 wrote.
  • "latest": the newest format the electronUpdaterCompatibility range supports (currently the same as unset). A future format then costs one full download per user, as below.

Apps whose electron-updater cannot read a release's format, or whose cached map is in another format, download that update in full once; the next one is differential again, or with an artifact name without ${version} the one after it.

Block maps embedded in an artifact (AppImage, the NSIS web installer's app package) are always "v2". See the v27 notes.

Inherited from​

CommonConfiguration.blockmap


buildNumber?​

readonly optional buildNumber?: string | null

The build number.

Maps to the --iteration flag for FPM-based Linux targets and is appended to the version string in CFBundleVersion (macOS) and FileVersion (Windows) when buildVersion is not set explicitly.

If not set, falls back to the first defined environment variable among: BUILD_NUMBER, TRAVIS_BUILD_NUMBER, APPVEYOR_BUILD_NUMBER, CIRCLE_BUILD_NUM, BUILD_BUILDNUMBER, CI_PIPELINE_IID.

Inherited from​

CommonConfiguration.buildNumber


buildVersion?​

readonly optional buildVersion?: string | null

The full build version string.

Maps to CFBundleVersion on macOS and the FileVersion metadata field on Windows. Defaults to the version field from package.json.

If buildVersion is not set but buildNumber is defined (or resolved from an environment variable), the effective build version becomes ${version}.${buildNumber}.

Inherited from​

CommonConfiguration.buildVersion


compression?​

readonly optional compression?: CompressionLevel | null

The compression level. If you want to rapidly test build, store can reduce build time significantly. maximum doesn't lead to noticeable size difference, but increase build time.

Default​

normal

Inherited from​

PlatformSpecificBuildOptions.compression


concurrency?​

readonly optional concurrency?: Concurrency | null

Configuration for experimental concurrent (multi-platform / multi-arch) builds.

When jobs > 1, electron-builder runs up to jobs platform builds in parallel. This is an experimental feature — use with caution and verify that your hook functions and build resources are safe to execute concurrently.

See​

Concurrency

Inherited from​

CommonConfiguration.concurrency


readonly optional copyright?: string | null

The copyright string embedded in the built artifacts.

Appears in the Windows LegalCopyright version-info field and the macOS NSHumanReadableCopyright Info.plist key.

Default​

Copyright © ${year} ${author}

Inherited from​

CommonConfiguration.copyright


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 ./package.deb.

See​

DebOptions

Inherited from​

CommonConfiguration.deb


defaultArch?​

readonly optional defaultArch?: string

The default architecture to build for when no --arch flag is specified. Defaults to the current machine's architecture.

Inherited from​

PlatformSpecificBuildOptions.defaultArch


detectUpdateChannel?​

readonly optional detectUpdateChannel?: boolean

Whether to infer update channel from application version pre-release components. e.g. if version 0.12.1-alpha.1, channel will be set to alpha. Otherwise to latest. This does not apply to github publishing, which will never auto-detect the update channel.

Default​

true

Inherited from​

PlatformSpecificBuildOptions.detectUpdateChannel


directories?​

readonly optional directories?: MetadataDirectories | null

Overrides for input/output directory paths used during the build.

See​

MetadataDirectories

Inherited from​

CommonConfiguration.directories


dmg?​

readonly optional dmg?: DmgOptions | null

macOS DMG disk image options (background image, window position, icon layout, licence, etc.).

See​

DmgOptions

Inherited from​

CommonConfiguration.dmg


downloadAlternateFFmpeg?​

readonly optional downloadAlternateFFmpeg?: boolean

Whether to download the FFmpeg library variant from Electron's release assets and replace the default (proprietary codec) FFmpeg library before signing.

The alternate FFmpeg is compiled without proprietary codec support (H.264, AAC, etc.) and is required for distributing on certain platforms (e.g., Linux distributions that prohibit proprietary codecs). Enabling this swaps the bundled ffmpeg dynamic library before the app is signed.

Inherited from​

CommonConfiguration.downloadAlternateFFmpeg


electronBranding?​

readonly optional electronBranding?: ElectronBrandingOptions

Electron branding overrides.

Required only when packaging a custom Electron fork that ships a modified BRANDING.json (e.g., a fork that renames the Electron Helper process or the Electron Framework). Standard Electron builds do not need this.


electronDist?​

readonly optional electronDist?: string | Hook<PrepareApplicationStageDirectoryOptions, string> | null

Override the source of the Electron distribution to stage.

Should return the path to either:

  • A directory containing a pre-built, unpacked Electron app (e.g. ~/electron/out/R).
  • A directory containing Electron zip archives following the naming convention electron-v${version}-${platformName}-${arch}.zip.

When not set, electron-builder downloads the official Electron release from GitHub (or the mirror configured via electronGet).

Receives a PrepareApplicationStageDirectoryOptions.

Inherited from​

Hooks.electronDist


electronFuses?​

readonly optional electronFuses?: FuseOptionsV1 | null

Options forwarded to @electron/fuses to flip Electron feature flags in the binary.

Fuses are compile-time-like flags baked into the Electron binary that cannot be changed at runtime. Flipping them is the approved mechanism for hardening Electron apps (e.g., disabling ELECTRON_RUN_AS_NODE, enabling ASAR integrity, etc.).

electron-builder flips fuses after packaging but before signing so that the final signature covers the modified binary.

See​

FuseOptionsV1

Inherited from​

CommonConfiguration.electronFuses


electronGet?​

readonly optional electronGet?: ElectronGetOptions | null

Options forwarded to @electron/get when downloading the Electron distribution to package.

checksums (a map of artifact file name → SHA-256 hex) makes checksum validation fully offline — without it, @electron/get fetches SHASUMS256.txt from the network on every build, even when the artifact itself is already cached. When checksums is not configured, electron-builder automatically picks up a locally seeded SHASUMS256.txt-<version> (or SHASUMS256.txt) file at the root of the Electron cache directory. See the air-gapped / offline builds guide.


electronLanguages?​

readonly optional electronLanguages?: string | string[]

The electron locales to keep. By default, all Electron locales used as-is.

Inherited from​

PlatformSpecificBuildOptions.electronLanguages


electronUpdaterCompatibility?​

readonly optional electronUpdaterCompatibility?: string | null

The electron-updater compatibility semver range: the electron-updater versions the installed apps ship, which have to read the update files this build writes. It selects the .blockmap format (see blockmap), and the build fails when the app's electron-updater does not satisfy it.

Default​

>=7

Inherited from​

PlatformSpecificBuildOptions.electronUpdaterCompatibility


electronVersion?​

optional electronVersion?: string | null

The Electron version to package against.

Defaults to the version of the electron (or electron-prebuilt) dependency declared in package.json. Set this explicitly only when the installed Electron version is not the one you want to package against (e.g., in monorepos where the Electron dependency lives in a different workspace).


executableName?​

readonly optional executableName?: string | null

The executable name. Defaults to productName Note: Except for Linux, where this would constitute a breaking change in previous behavior and lead to both invalid executable names and Desktop files. Ref comments in: https://github.com/electron-userland/electron-builder/pull/9068

Inherited from​

PlatformSpecificBuildOptions.executableName


extends?​

optional extends?: string | string[] | null

One or more configuration presets or file paths to merge into this configuration.

Accepts a string or array of strings, each of which is either:

  • A built-in preset name ("react-cra" is the only currently supported value).
  • A path to a JS/JSON config file relative to the project directory.

Configs are merged left-to-right using a deep-assign strategy that properly combines files glob patterns rather than replacing them.

The react-cra preset is applied automatically when react-scripts is found in dependencies. Set extends: null to opt out of automatic preset detection.


extraMetadata?​

readonly optional extraMetadata?: any

Additional properties to deep-merge into the app's package.json at build time.

Useful for injecting build-time metadata (e.g., a git commit hash or CI build URL) that should be readable at runtime via require('./package.json') or import.meta.url.

Example​

{ "extraMetadata": { "commitHash": "abc1234", "buildDate": "2025-01-01" } }

Inherited from​

CommonConfiguration.extraMetadata


fileAssociations?​

readonly optional fileAssociations?: FileAssociation | FileAssociation[]

The file associations.

Inherited from​

PlatformSpecificBuildOptions.fileAssociations


fileOptions?​

optional fileOptions?: FilesBuildOptions | null

Which files to copy into the packaged app (files, the app sources, extraResources and extraFiles), which file extensions to exclude from it (excludedExts), and whether symlinks among them may lead outside the app and the workspace (allowExternalLinks). Set at the configuration root, per platform (e.g. mac.fileOptions), or both: a platform's file lists are added to the root ones, and a platform's excludedExts and allowExternalLinks replace the root ones.

{
"fileOptions": {
"files": ["dist/**/*", "package.json"],
"extraResources": [{ "from": "assets/bin", "to": "bin" }]
}
}

files, extraResources and extraFiles set directly on the configuration or a platform section are moved here when the configuration is loaded, with a warning. Run electron-builder migrate-schema to update the configuration.

Inherited from​

PlatformSpecificBuildOptions.fileOptions


flatpak?​

readonly optional flatpak?: FlatpakOptions | null

Flatpak options.

Flatpak is a sandboxed application distribution format for Linux distributed via Flathub or self-hosted OSTree repositories.

See​

FlatpakOptions

Inherited from​

CommonConfiguration.flatpak


forceCodeSigning?​

readonly optional forceCodeSigning?: boolean

Whether to throw an error and abort the build if the app could not be code-signed, notarized, or have its auto-update manifests signed - and to verify the signatures the build produces.

Set to true in release pipelines to catch missing or misconfigured signing credentials before producing unsigned artifacts. When false (the default), missing signing credentials produce a warning and the build continues unsigned.

With true:

  • macOS: the app must be signed, which needs a macOS host, also in pull-request builds (set CSC_FOR_PULL_REQUEST=true to sign them, or pass -c.forceCodeSigning=false there), and notarized: notarization credentials must be set when the build starts. The output of a custom mac.sign signer is checked with codesign --verify --deep --strict, the stapled ticket with stapler validate, a signed pkg with pkgutil --check-signature, and a DMG with dmg.sign: true must be signed.
  • Windows: every signed file is read back and must carry a valid Authenticode signature.
  • Every platform (the only effect on Linux): auto-update manifests must be signed, also by a build that does not publish.
  • A prepackaged app, which electron-builder does not sign, must already be signed (and, on macOS, notarized).

Explicit opt-outs are honored with a warning: mac.notarize: false, updateManifest: false, win.signExts exclusions and a custom nsis.script (whose uninstaller electron-builder does not sign). win.sign: false and mac.sign: null contradict it and fail the build. electron-builder verify checks the build output afterwards.

Default​

false

Inherited from​

CommonConfiguration.forceCodeSigning


freebsd?​

readonly optional freebsd?: LinuxTargetSpecificOptions | null

FreeBSD pkg package options.

Produces a .pkg archive for the FreeBSD package manager.

Inherited from​

CommonConfiguration.freebsd


generateUpdatesFilesForAllChannels?​

readonly optional generateUpdatesFilesForAllChannels?: boolean

Please see Building and Releasing using Channels.

Default​

false

Inherited from​

PlatformSpecificBuildOptions.generateUpdatesFilesForAllChannels


ignoredProductionDependencies?​

readonly optional ignoredProductionDependencies?: string[] | null

Names of production dependencies that are excluded from the copied node_modules, even if they are declared in the dependencies section of package.json.

electron-builder copies the resolved production dependency tree into the app. Some packages — notably electron — are already provided another way (the Electron runtime is embedded separately), so copying them would just duplicate what is already there. Such packages are excluded from the copy rather than rejected: they remain valid production dependencies for tooling purposes (e.g. SBOM, license, and vulnerability tracking) without being shipped twice.

Only dependencies declared by the app itself are eligible: a listed name and the transitive dependencies required only by it are dropped, while anything also required by another (kept) production dependency stays bundled. A matching name that appears solely as a transitive dependency of a kept package is never excluded. Note that a kept package which require()s an excluded name at runtime without declaring it (relying on hoisting) will fail with MODULE_NOT_FOUND — declare such a dependency properly or remove the name from this list.

Matching is by the dependency name as declared in package.json: an npm alias ("custom-electron": "npm:electron@^30.0.0") is matched by its alias key (custom-electron), never by the underlying package name.

Overriding this option replaces the default list, so include electron and electron-builder unless you intend to ship them. The most common reason to override is to add a dependency that a bundler (Vite, webpack, esbuild, …) already inlines into your app code: keep it in dependencies so SBOM/license tooling still sees it, and list it here so a duplicate copy is not packaged — e.g. ["electron", "electron-builder", "react", "react-dom"]. Removing a default name keeps that package in the copied node_modules. Setting the option to null (or omitting it) applies the default list; to disable exclusion entirely, set it to an empty array []. Each excluded package is logged once during packaging.

Default​

["electron", "electron-builder"]

Inherited from​

CommonConfiguration.ignoredProductionDependencies


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.).

See​

LinuxConfiguration

Inherited from​

CommonConfiguration.linux


mac?​

readonly optional mac?: MacConfiguration | null

macOS-specific build options (signing, entitlements, notarization, target categories, etc.).

See​

MacConfiguration

Inherited from​

CommonConfiguration.mac


mas?​

readonly optional mas?: MasConfiguration | null

macOS App Store (MAS) submission options.

See​

MasConfiguration

Inherited from​

CommonConfiguration.mas


masDev?​

readonly optional masDev?: MasConfiguration | null

macOS App Store development-signing options (mas-dev target). Used for local testing of MAS builds without submitting to the store.

See​

MasConfiguration

Inherited from​

CommonConfiguration.masDev


msi?​

readonly optional msi?: MsiOptions | null

WiX-based MSI installer options.

Produces a traditional .msi package built with the WiX Toolset. Best for enterprise deployments that require MSI-based installation policies.

See​

MsiOptions

Inherited from​

CommonConfiguration.msi


msiProjectCreated?​

readonly optional msiProjectCreated?: string | Hook<string, void> | null

Called after the WiX MSI project XML has been written to a temporary directory but before candle.exe / light.exe compile it into a .msi package.

The hook receives the path to the project directory as a string. Use it to patch the generated .wxs files for customizations not exposed through electron-builder's options.

Inherited from​

Hooks.msiProjectCreated


msiWrapped?​

readonly optional msiWrapped?: MsiWrappedOptions | null

MSI-wrapped NSIS installer options.

Wraps the standard NSIS installer inside an MSI package so that it can be deployed via Group Policy or other MSI-only channels while preserving the NSIS installer UX.

See​

MsiWrappedOptions

Inherited from​

CommonConfiguration.msiWrapped


msix?​

readonly optional msix?: MsixOptions | null

MSIX package options. MSIX is the modern successor to AppX with additional deployment features.

Inherited from​

CommonConfiguration.msix


nativeModules?​

readonly optional nativeModules?: NativeModulesConfig | null

Configuration for native Node.js module installation and rebuilding.

Groups all options that control how electron-builder handles native modules — from forcing source builds during install through to the @electron/rebuild compilation mode.

See​

NativeModulesConfig

Inherited from​

CommonConfiguration.nativeModules


npmArgs?​

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

Additional command-line arguments appended to the package manager's install command when electron-builder installs app dependencies (i.e., when node_modules is missing and a fresh install is required).

These arguments are appended only during the install phase, not during the rebuild phase. To influence @electron/rebuild directly, see NativeModulesConfig.rebuildMode.

Example​

{ "npmArgs": ["--prefer-offline", "--ignore-scripts"] }

Inherited from​

CommonConfiguration.npmArgs


nsis?​

readonly optional nsis?: NsisOptions | null

NSIS one-click installer options.

NSIS (Nullsoft Scriptable Install System) is the default Windows installer format produced by electron-builder. It generates a lightweight, self-extracting .exe installer.

See​

NsisOptions

Inherited from​

CommonConfiguration.nsis


nsisWeb?​

readonly optional nsisWeb?: NsisWebOptions | null

NSIS web installer options.

Like the standard NSIS installer but the app payload is downloaded from a remote URL at install time rather than bundled into the .exe. Useful for very large apps or staged rollouts.

See​

NsisWebOptions

Inherited from​

CommonConfiguration.nsisWeb


onNodeModuleFile?​

readonly optional onNodeModuleFile?: string | Hook<string, boolean | void> | null

Called for every file inside each node_modules package directory as electron-builder decides whether to include it in the packaged app.

Return true to force-include the file regardless of the default exclusion rules. Return false or undefined to let electron-builder apply its normal filtering logic.

Receives the absolute path of the file as a string.

Inherited from​

Hooks.onNodeModuleFile


p5p?​

readonly optional p5p?: LinuxTargetSpecificOptions | null

Solaris IPS package options.

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

Inherited from​

CommonConfiguration.p5p


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 ./package.pacman.

See​

PacmanOptions

Inherited from​

CommonConfiguration.pacman


pkg?​

readonly optional pkg?: PkgOptions | null

macOS PKG flat-package installer options.

See​

PkgOptions

Inherited from​

CommonConfiguration.pkg


pkgDistributionCreated?​

readonly optional pkgDistributionCreated?: string | Hook<string, void> | null

Called after the distribution.xml of a macOS pkg installer has been written (synthesized by productbuild --synthesize, then customized from PkgOptions) but before productbuild builds the installer from it.

The hook receives the path to the distribution file as a string. Edit it in place or overwrite it to customize the installer beyond PkgOptions (for example, its <title>).

Inherited from​

Hooks.pkgDistributionCreated


portable?​

readonly optional portable?: PortableOptions | null

Portable executable options.

Produces a single .exe that requires no installation — it extracts and runs directly.

See​

PortableOptions

Inherited from​

CommonConfiguration.portable


productName?​

readonly optional productName?: string | null

The human-readable product name displayed in installers, the macOS dock, and the Windows Apps & Features list.

Unlike the name field in package.json, this value may contain spaces and other characters that are not allowed in npm package names.

Resolution order:

  1. productName inside the build configuration block.
  2. productName at the top level of package.json.
  3. name at the top level of package.json.

Inherited from​

CommonConfiguration.productName


protocols?​

readonly optional protocols?: Protocol | Protocol[]

The URL protocol schemes.

Inherited from​

PlatformSpecificBuildOptions.protocols


publish?​

optional publish?: Publish

Publisher configuration. See Auto Update for more information.

Inherited from​

PlatformSpecificBuildOptions.publish


releaseInfo?​

readonly optional releaseInfo?: ReleaseInfo

The release info. Intended for command line usage:

-c.releaseInfo.releaseNotes="new features"

Inherited from​

PlatformSpecificBuildOptions.releaseInfo


removePackageKeywords?​

readonly optional removePackageKeywords?: boolean

Whether to remove the keywords field from bundled package.json files.

The keywords array is only meaningful for package registry discoverability and has no runtime value inside a packaged Electron app. Removing it marginally reduces artifact size.

Default​

true

Inherited from​

CommonConfiguration.removePackageKeywords


removePackageScripts?​

readonly optional removePackageScripts?: boolean

Whether to remove the scripts field from bundled package.json files.

Lifecycle scripts (preinstall, postinstall, etc.) have no meaning inside a packaged Electron app and can trigger unintended behaviour if any tooling inspects the bundled package.json. Removing them reduces artifact size and prevents accidental execution.

Default​

true

Inherited from​

CommonConfiguration.removePackageScripts


rpm?​

readonly optional rpm?: RpmOptions | null

RPM package options.

Targets Fedora, Red Hat Enterprise Linux, SUSE, and RPM-based distributions. Produces a .rpm archive installable via rpm -i or dnf install ./package.rpm.

See​

RpmOptions

Inherited from​

CommonConfiguration.rpm


snapcraft?​

readonly optional snapcraft?: SnapcraftOptions | null

Snapcraft configuration.

Selects the snapcraft base and provides per-core options:

  • base: "core18" | "core20" | "core22" — legacy bases; still functional but not recommended for new apps.
  • base: "core24" — modern base with the GNOME extension (recommended, requires Electron 25+).
  • base: "custom" — pass an existing snapcraft.yaml through unchanged; no plugs, extensions, or desktop files are injected.

Example​

{ "snapcraft": { "base": "core24", "core24": { "useLXD": true } } }

See​

SnapcraftOptions

Inherited from​

CommonConfiguration.snapcraft


squirrelWindows?​

readonly optional squirrelWindows?: SquirrelWindowsOptions | null

Squirrel.Windows auto-update installer options.

Requires the electron-builder-squirrel-windows optional dependency.

See​

SquirrelWindowsOptions

Inherited from​

CommonConfiguration.squirrelWindows


target?​

readonly optional target?: string | TargetConfiguration | (string | TargetConfiguration)[] | null

The build target(s) for this platform. Can be a target name string, a TargetConfiguration object, or an array of either. Available targets depend on the platform — see platform-specific options (e.g. MacConfiguration.target, WindowsConfiguration.target, LinuxConfiguration.target).

Inherited from​

PlatformSpecificBuildOptions.target


toolsets?​

readonly optional toolsets?: ToolsetConfig | null

Pinned versions of the binary toolsets electron-builder downloads and uses internally.

Each property selects a specific release of the corresponding tool bundle. Set a property to "0.0.0" to force the legacy bundle (pre-v27 behaviour). Leave a property unset (or set it to "latest") to use the modern default (newest bundle) for that toolset.

Note: Toolset versioning can drop intermediate releases (such as if a problem is discovered in a bundle). If you need to pin to a specific release, check the release notes for the toolset to ensure the version you specify is valid.

See​

ToolsetConfig

Inherited from​

CommonConfiguration.toolsets


updateManifest?​

readonly optional updateManifest?: false | UpdateManifestSigningOptions | null

Ed25519 signing of the auto-update manifest (latest*.yml). Each manifest is signed and its public key is embedded into app-update.yml, so electron-updater verifies the signature before downloading an update.

Signing is required. Publishing a build that emits auto-update metadata fails unless a signing key resolves. Generate one once with electron-builder create-update-key, then supply it via ELECTRON_BUILDER_UPDATE_SIGN_KEY (the PEM file, base64-encoded) / ELECTRON_BUILDER_UPDATE_SIGN_KEY_FILE (its path), preferred in CI, or via signingKey / signingKeyFile below. Leaving this option unset — or null — keeps signing required and resolves the key from the environment; null is not an opt-out.

Set to false, the only opt-out, to ship unsigned manifests. Every build that produces a manifest then logs a warning. false also short-circuits the environment variables, so a leftover ELECTRON_BUILDER_UPDATE_SIGN_KEY in CI cannot re-enable signing by accident.

The requirement is enforced when a publish policy is in effect (--publish) or forceCodeSigning is set; any other build warns instead, so local builds and pipelines that sign the manifest in a later step of their own are unaffected. It is also waived when every publish provider has publishAutoUpdate: false, since no manifest is emitted then, and for a build whose targets write no update info (e.g. only snap, flatpak, MSI/MSIX, portable, mas/pkg or plain archives). A publishing (or forceCodeSigning) build checks for the key at build start, before anything is packed or uploaded. Every signed manifest is read back and verified before it is written.

See Signed Update Manifests.

Inherited from​

PlatformSpecificBuildOptions.updateManifest


win?​

readonly optional win?: WindowsConfiguration | null

Windows-specific build options (signing, NSIS, icon, file associations, etc.).

See​

WindowsConfiguration

Inherited from​

CommonConfiguration.win


writeEffectiveConfig?​

readonly optional writeEffectiveConfig?: boolean | null

Whether to write builder-effective-config.yaml (the resolved configuration, including the detected electronVersion) to the output directory.

Defaults to writing it only for local interactive builds: not on CI and not when stdout is piped. Set true to always write it, e.g. to read the resolved configuration in a CI step, or false to never write it.