The directory containing the packaged Electron application
Fully resolved forge configuration, you shouldn't really need this
Optional ReadonlybuildIdentifier?: string | {}A string to uniquely identify artifacts of this build, will be appended to the out dir to generate a nested directory. E.g. out/current-timestamp
If a function is provided, it must synchronously return the buildIdentifier
Optional Readonlyhooks?: {Readonlymakers: readonly (Optional ReadonlyoutDir?: stringOutput directory. Default is './out'.
ReadonlypackagerConfig: {Optional ReadonlyafterAsar?: readonly {}[]Functions to be called after your app directory has been packaged into an .asar file.
Note: afterAsar will only be called if the asar option is set.
Optional ReadonlyafterComplete?: readonly {}[]Functions to be called after the packaged application has been moved to the final directory.
Optional ReadonlyafterCopy?: readonly {}[]Functions to be called after your app directory has been copied to a temporary directory.
Note: afterCopy will not be called if the prebuiltAsar option is set.
Optional ReadonlyafterCopyExtraResources?: readonly {}[]Functions to be called after the files specified in the extraResource option have been copied.
Optional ReadonlyafterExtract?: readonly {}[]Functions to be called after the prebuilt Electron binary has been extracted to a temporary directory.
Optional ReadonlyafterFinalizePackageTargets?: readonly {}[]Functions to be called after the final matrix of platform/arch combination is determined. Use this to learn what archs/platforms packager is targetting when you pass "all" as a value.
Optional ReadonlyafterInitialize?: readonly {}[]Optional ReadonlyafterPrune?: readonly {}[]Functions to be called after Node module pruning has been applied to the application.
Note: None of these functions will be called if the prune option is false or
the prebuiltAsar option is set.
Optional Readonlyall?: booleanWhen true, sets both arch and platform to all.
Optional ReadonlyappBundleId?: stringOptional ReadonlyappCategoryType?: stringThe application category type, as shown in the Finder via View → Arrange by Application Category when viewing the Applications directory.
For example, app-category-type=public.app-category.developer-tools will set the
application category to Developer Tools.
Valid values are listed in Apple's documentation.
Optional ReadonlyappCopyright?: stringThe human-readable copyright line for the app. Maps to the LegalCopyright metadata
property on Windows, and NSHumanReadableCopyright on macOS.
Optional ReadonlyappVersion?: stringThe release version of the application.
By default the version property in the package.json is used, but it can be overridden
with this argument. If neither are provided, the version of Electron will be used. Maps
to the ProductVersion metadata property on Windows, and CFBundleShortVersionString
on macOS.
Optional Readonlyasar?: Whether to package the application's source code into an archive, using Electron's
archive format. Reasons why you may want to enable
this feature include mitigating issues around long path names on Windows, slightly speeding
up require, and concealing your source code from cursory inspection. When the value
is true, it passes the default configuration to the asar module. The configuration
values can be customized when the value is an Object. Supported sub-options include, but
are not limited to:
ordering (string): A path to an ordering file for packing files. An explanation can be
found on the Atom issue tracker.unpack (string): A glob expression,
when specified, unpacks the file with matching names to the app.asar.unpacked directory.unpackDir (string): Unpacks the dir to the app.asar.unpacked directory whose names
exactly or pattern match this string. The asar.unpackDir is relative to dir.Defaults to false.
Some examples:
asar.unpackDir = 'sub_dir' will unpack the directory /<dir>/sub_dirasar.unpackDir = path.join('**', '{sub_dir1/sub_sub_dir,sub_dir2}', '*') will unpack the directories /<dir>/sub_dir1/sub_sub_dir and /<dir>/sub_dir2, but it will not include their subdirectories.asar.unpackDir = path.join('**', '{sub_dir1/sub_sub_dir,sub_dir2}', '**') will unpack the subdirectories of the directories /<dir>/sub_dir1/sub_sub_dir and /<dir>/sub_dir2.asar.unpackDir = path.join('**', '{sub_dir1/sub_sub_dir,sub_dir2}', '**', '*') will unpack the directories /<dir>/sub_dir1/sub_sub_dir and /<dir>/sub_dir2 and their subdirectories.Note: asar will have no effect if the prebuiltAsar option is set.
Optional ReadonlybeforeAsar?: readonly {}[]Functions to be called before your app directory is packaged into an .asar file.
Note: beforeAsar will only be called if the asar option is set.
Optional ReadonlybeforeCopy?: readonly {}[]Functions to be called before your app directory is copied to a temporary directory.
Note: beforeCopy will not be called if the prebuiltAsar option is set.
Optional ReadonlybeforeCopyExtraResources?: readonly {}[]Functions to be called before the files specified in the extraResource option are copied.
Optional ReadonlybuildVersion?: stringThe build version of the application. Defaults to the value of the appVersion option.
Maps to the FileVersion metadata property on Windows, and CFBundleVersion on macOS.
Optional ReadonlydarwinDarkModeSupport?: booleanForces support for Mojave (macOS 10.14) dark mode in your packaged app. This sets the
NSRequiresAquaSystemAppearance key to false in your app's Info.plist. For more information,
see the Electron documentation
and the Apple developer documentation.
Optional ReadonlyderefSymlinks?: booleanWhether symlinks should be dereferenced during the copying of the application source.
Note: derefSymlinks will have no effect if the prebuiltAsar option is set.
Optional Readonlydownload?: {If present, passes custom options to @electron/get. See
the module for option descriptions, proxy support, and defaults. Supported parameters
include, but are not limited to:
cacheRoot (string): The directory where prebuilt, pre-packaged Electron downloads are cached.mirrorOptions (Object): Options to override the default Electron download location.Note: download sub-options will have no effect if the electronZipDir option is set.
Optional ReadonlycacheMode?: ElectronDownloadCacheModeControls the cache read and write behavior.
When set to either ElectronDownloadCacheMode.ReadOnly | ReadOnly or
ElectronDownloadCacheMode.Bypass | Bypass, the caller is responsible
for cleaning up the returned file path once they are done using it
(e.g. via fs.remove(path.dirname(pathFromElectronGet))).
When set to either ElectronDownloadCacheMode.WriteOnly | WriteOnly or ElectronDownloadCacheMode.ReadWrite | ReadWrite (the default), the caller should not move or delete the file path that is returned as the path points directly to the disk cache.
This option cannot be used in conjunction with ElectronDownloadRequestOptions.force.
Optional ReadonlycacheRoot?: stringThe directory that caches Electron artifact downloads.
Optional Readonlychecksums?: { readonly [key: string]: string }Provides checksums for the artifact as strings. Can be used if you already know the checksums of the Electron artifact you are downloading and want to skip the checksum file download without skipping the checksum validation.
This should be an object whose keys are the file names of the artifacts and the values are their respective SHA256 checksums.
Optional Readonlydownloader?: { download: {} }A custom Downloader class used to download artifacts. Defaults to the built-in GotDownloader.
Optional ReadonlydownloadOptions?: anyOptions passed to the downloader module.
Optional Readonlyforce?: booleanWhether to download an artifact regardless of whether it's in the cache directory.
This option is deprecated and directly maps to cacheMode: ElectronDownloadCacheMode.WriteOnly
Optional ReadonlymirrorOptions?: {Options related to specifying an artifact mirror.
Optional ReadonlycustomDir?: stringThe name of the directory to download from, often scoped by version number e.g 'v4.0.4'
Optional ReadonlycustomFilename?: stringThe name of the asset to download, e.g 'electron-v4.0.4-linux-x64.zip'
Optional ReadonlycustomVersion?: stringThe version of the asset to download, e.g '4.0.4'
Optional Readonlymirror?: stringThe base URL of the mirror to download from. e.g https://github.com/electron/electron/releases/download
Optional Readonlynightly_mirror?: stringOptional ReadonlynightlyMirror?: stringThe mirror URL for electron-nightly,
which lives in a separate npm package.
Optional ReadonlyresolveAssetURL?: {}A function allowing customization of the url returned from getArtifactRemoteURL().
Optional ReadonlytempDirectory?: stringA temporary directory for downloads. It is used before artifacts are put into cache.
the OS default temporary directory via os.tmpdir()
Optional ReadonlyunsafelyDisableChecksums?: booleanWhen set to true, disables checking that the artifact download completed successfully
with the correct payload.
Optional ReadonlyelectronZipDir?: stringThe local path to a directory containing Electron ZIP files for Electron Packager to unzip, instead of downloading them. The ZIP filenames should be in the same format as the ones downloaded from the Electron releases site.
Note: Setting this option prevents the download sub-options from being used, as the functionality gets skipped over.
Optional ReadonlyexecutableName?: stringOptional ReadonlyextendHelperInfo?: string | { readonly [key: string]: any }When the value is a string, specifies the filename of a plist file. Its contents are merged
into all the Helper apps' Info.plist files.
When the value is an Object, it specifies an already-parsed plist data structure that is
merged into all the Helper apps' Info.plist files.
Entries from extendHelperInfo override entries in the helper apps' Info.plist file supplied by
electron or electron-nightly, but are overridden by other
options such as appVersion or appBundleId.
Optional ReadonlyextendInfo?: string | { readonly [key: string]: any }When the value is a string, specifies the filename of a plist file. Its contents are merged
into the app's Info.plist.
When the value is an Object, it specifies an already-parsed plist data structure that is
merged into the app's Info.plist.
Entries from extendInfo override entries in the base Info.plist file supplied by
electron or electron-nightly, but are overridden by other
options such as appVersion or appBundleId.
Optional ReadonlyextraResource?: string | readonly string[]One or more files to be copied directly into the app's Contents/Resources directory for
macOS target platforms, and the resources directory for other target platforms. The
resources directory can be referenced in the packaged app via the
process.resourcesPath value.
Optional ReadonlyhelperBundleId?: stringThe bundle identifier to use in the application helper's Info.plist.
Optional Readonlyicon?: string | readonly string[]The local path to the icon file, if the target platform supports setting embedding an icon.
Only macOS supports multiple paths, every other platform must be a single path. On macOS you can provide
both an .icns and an .icon file. The .icns file will be used on macOS < 26 and .icon will be used
on macOS >= 26.
Currently you must look for conversion tools in order to supply an icon in the format required by the platform:
.icon from Icon Composer (only supported if Xcode 26 or higher is present) or .icns.ico (See the readme for details on non-Windows platforms)icon option in the BrowserWindow constructor.
Please note that you need to use a PNG, and not the macOS or Windows icon formats, in order for it
to show up in the dock/window list. Setting the icon in the file manager is not currently supported.If the file extension is omitted, it is auto-completed to the correct extension based on the
platform, including when platform |platform: 'all' is in effect.
Optional Readonlyignore?: One or more additional regular expression patterns which specify which files to ignore when copying files to create the app bundle(s). The regular expressions are matched against the absolute path of a given file/directory to be copied.
Please note that glob patterns will not work.
The following paths are always ignored (when you aren't using an IgnoreFunction):
node_modules/.binnode_modules/electronnode_modules/electron-nightly.git.o and .objNote: Node modules specified in devDependencies are ignored by default, via the
prune option.
Note: ignore will have no effect if the prebuiltAsar option is set.
Optional Readonlyjunk?: booleanIgnores system junk files when copying the Electron app, regardless of the ignore option.
Note: junk will have no effect if the prebuiltAsar option is set.
Optional Readonlyname?: stringThe application name. If omitted, it will use the productName or name value from the
nearest package.json.
Regardless of source, characters in the Electron app name which are not allowed in all target
platforms' filenames (e.g., /), will be replaced by hyphens (-).
Optional ReadonlyosxNotarize?: If present, notarizes macOS target apps when the host platform is macOS and Xcode is installed.
See @electron/notarize
for option descriptions, such as how to use appleIdPassword safely or obtain an API key.
Requires the osxSign option to be set.
Optional ReadonlyosxSign?: If present, signs macOS target apps when the host platform is macOS and Xcode is installed.
When the value is true, pass default configuration to the signing module. See
@electron/osx-sign for sub-option descriptions and
their defaults. Options include, but are not limited to:
identity (string): The identity used when signing the package via codesign.binaries (arrayOptional ReadonlyosxUniversal?: {Used to provide custom options to the internal call to @electron/universal when building a macOS
app with the target architecture of "universal". Unused otherwise, providing a value does not imply
a universal app is built.
Optional ReadonlyinfoPlistsToIgnore?: stringA minimatch pattern of Info.plist
paths that should not receive an injected ElectronAsarIntegrity value.
Use this if your application contains another bundle that's already signed.
Optional ReadonlymergeASARs?: booleanMerge x64 and arm64 ASARs into one.
Optional ReadonlysingleArchFiles?: stringIf MakeUniversalOpts.mergeASARs is enabled, this property provides a minimatch pattern of paths that are allowed to be present in one of the ASAR files, but not in the other.
Optional Readonlyx64ArchFiles?: stringA minimatch pattern of binaries that are expected to be the same x64 binary in both
Use this if your application contains binaries that have already been merged into a universal file
using the lipo tool.
Apple's Building a universal macOS binary documentation
Optional Readonlyoverwrite?: booleanWhether to replace an already existing output directory for a given platform (true) or
skip recreating it (false). Defaults to false.
Optional ReadonlyprebuiltAsar?: stringThe path to a prebuilt ASAR file.
Note: Setting this option prevents the following options from being used, as the functionality gets skipped over:
Optional Readonlyprotocols?: readonly { name: string; schemes: readonly string[] }[]The URL protocol schemes associated with the Electron app.
Optional Readonlyprune?: booleanWalks the node_modules dependency tree to remove all of the packages specified in the
devDependencies section of package.json from the outputted Electron app.
Defaults to true.
Note: prune will have no effect if the prebuiltAsar option is set.
Optional Readonlyquiet?: booleanIf true, disables printing informational and warning messages to the console when
packaging the application. This does not disable errors.
Defaults to false.
Optional Readonlytmpdir?: string | falseThe base directory to use as a temporary directory. Set to false to disable use of a
temporary directory. Defaults to the system's temporary directory.
Optional ReadonlyusageDescription?: { readonly [key: string]: string }Human-readable descriptions of how the Electron app uses certain macOS features. These are displayed in the App Store. A non-exhaustive list of available properties:
Camera - required for media access API usage in macOS CatalinaMicrophone - required for media access API usage in macOS CatalinaValid properties are the Cocoa keys for MacOS
of the pattern NS(.*)UsageDescription, where the captured group is the key to use.
Optional Readonlywin32metadata?: {Application metadata to embed into the Windows executable.
Optional Readonlyapplication-manifest?: stringPath to a local manifest file.
See MSDN for more details.
Optional ReadonlyCompanyName?: stringDefaults to the author name from the nearest package.json.
Optional ReadonlyFileDescription?: stringDefaults to either productName or name from the nearest package.json.
Optional ReadonlyInternalName?: stringDefaults to either productName or name from the nearest package.json.
Optional ReadonlyOriginalFilename?: stringDefaults to the renamed Electron .exe file.
Optional ReadonlyProductName?: stringDefaults to either productName or name from the nearest package.json.
Optional Readonlyrequested-execution-level?: "asInvoker" | "highestAvailable" | "requireAdministrator"See MSDN for details.
Optional ReadonlywindowsSign?: If present, signs Windows binary files.
When the value is true, pass default configuration to the signing module. See
@electron/windows-sign for sub-option descriptions and
their defaults.
Readonlyplugins: readonly (An array of Forge plugins or a tuple consisting of [pluginName, pluginOptions]
Readonlypublishers: readonly (ReadonlyrebuildConfig: {Optional ReadonlybuildFromSource?: booleanSkip prebuild download and rebuild module from source.
Optional Readonly ExperimentalcachePath?: stringSets a custom cache path for the useCache option.
Optional Readonlydebug?: booleanRebuilds a Debug build of target modules. If this is false, a Release build will be generated instead.
Optional ReadonlydisablePreGypCopy?: booleanDisables the copying of .node files if not needed.
Optional ReadonlyextraModules?: readonly string[]An array of module names to rebuild in addition to detected modules
Optional Readonlyforce?: booleanForce a rebuild of modules regardless of their current build state.
Optional ReadonlyforceABI?: numberOverride the Application Binary Interface (ABI) version for the version of Electron you are targeting. Only use when targeting nightly releases.
the electron/node-abi repository for a list of Electron and Node.js ABIs
Optional ReadonlyheaderURL?: stringURL to download Electron header files from.
Optional ReadonlyignoreModules?: readonly string[]Array of module names to ignore during the rebuild process.
Optional Readonlyjobs?: numberNumber of parallel compile jobs node-gyp should run, passed through as node-gyp's --jobs flag.
Optional Readonlymode?: RebuildModeWhether to rebuild modules sequentially or in parallel.
Optional ReadonlyonlyModules?: readonly string[] | nullAn array of module names to rebuild. Only these modules will be rebuilt.
Optional Readonlyplatform?: PlatformOverride the target platform to something other than the host system platform. Note: This only applies to downloading prebuilt binaries. It is not possible to cross-compile native modules.
The system process.platform value
Optional ReadonlyprebuildTagPrefix?: stringGitHub tag prefix passed to prebuild-install.
Optional ReadonlyprojectRootPath?: stringPath to the root of the project if using npm or yarn workspaces.
Optional Readonlytypes?: readonly ModuleType[]Array of types of dependencies to rebuild. Possible values are prod, dev, and optional.
Optional Readonly ExperimentaluseCache?: booleanEnables hash-based caching to speed up local rebuilds.
Optional ReadonlyuseElectronClang?: booleanWhether to use the clang executable that Electron uses when building.
This will guarantee compiler compatibility.
The directory you should put all your artifacts in (potentially in sub folders) NOTE: this directory is not guarunteed to already exist
The application's package.json file
The target architecture you should make for
The target platform you should make for
The resolved human friendly name of the project