package.json
file of your project using the build
key on the top level: --config <path/to/yml-or-json5-or-toml-or-js>
option. Defaults to electron-builder.yml
. json
, json5, toml or js
(exported configuration or function that produces configuration) formats also supported.yarn add toml --dev
.null
— for example, to explicitly set that DMG icon must be default volume icon from the OS and default rules must be not applied (i.e. use application icon as DMG icon), set dmg.icon
to null
.${ext}
macro is supported in addition to file macros.electron-builder.env
in the current dir (example). Supported only for CLI usage.Array<String> | String
. Union like this means that you can specify or string (**/*
), or array of strings (['**/*', '!foo.js']
).appId
= com.electron.${name}
String - 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.productName
String - 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.copyright
= Copyright © year ${author}
String - The human-readable copyright line for the app.directories
Mount dmg windows 10.buildResources
= build
String - The path to build resources.'files': ['**/*', 'build/icon.*']
output
= dist
String - The output directory. File macros are supported.app
String - The application directory (containing the application package.json), defaults to app
, www
or working directory.mac
MacConfiguration - Options related to how build macOS targets.mas
MasConfiguration - MAS (Mac Application Store) options.dmg
DmgOptions - macOS DMG options.pkg
PkgOptions - macOS PKG options.win
WindowsConfiguration - Options related to how build Windows targets.nsis
NsisOptionsnsisWeb
- Web Installer options. Inherits NsisOptions options.appPackageUrl
String - The application package download URL. Optional — by default computed using publish configuration.https://example.com/download/latest
allows web installer to be version independent (installer will download latest application package). Please note — it is full URL.X-Arch
http header is set to 32
or 64
.artifactName
String - The artifact file name template. Defaults to ${productName} Web Setup ${version}.${ext}
.portable
- Portable options.requestExecutionLevel
= user
“user” | “highest” | “admin” - The requested execution level for Windows.unpackDirName
String - The unpack directory name in TEMP directory.appx
AppXOptionssquirrelWindows
SquirrelWindowsOptionslinux
LinuxConfiguration - Options related to how build Linux targets.deb
DebOptions - Debian package options.snap
SnapOptions - Snap options.appImage
AppImageOptions - AppImage options.pacman
LinuxTargetSpecificOptionsrpm
LinuxTargetSpecificOptionsfreebsd
LinuxTargetSpecificOptionsp5p
LinuxTargetSpecificOptionsapk
LinuxTargetSpecificOptionsbuildDependenciesFromSource
= false
Boolean - Whether to build the application native dependencies from source.nodeGypRebuild
= false
Boolean - Whether to execute node-gyp rebuild
before starting to package the app..npmrc
) for configuring electron headers. Use electron-builder node-gyp-rebuild
instead.npmArgs
Array<String> | String - Additional command line arguments to use when installing app native deps.npmRebuild
= true
Boolean - Whether to rebuild native dependencies before starting to package the app.buildVersion
String - The build version. Maps to the CFBundleVersion
on macOS, and FileVersion
metadata property on Windows. Defaults to the version
. If TRAVIS_BUILD_NUMBER
or APPVEYOR_BUILD_NUMBER
or CIRCLE_BUILD_NUM
or BUILD_NUMBER
or bamboo.buildNumber
or CI_PIPELINE_IID
env defined, it will be used as a build version (version.build_number
).electronCompile
Boolean - Whether to use electron-compile to compile app. Defaults to true
if electron-compile
in the dependencies. And false
if in the devDependencies
or doesn’t specified.electronDist
String - The path to custom Electron build (e.g. ~/electron/out/R
).electronDownload
- The electron-download options.version
Stringcache
String - The cache location.mirror
String - The mirror.strictSSL
BooleanisVerifyChecksum
Booleanplatform
“darwin” | “linux” | “win32” | “mas”arch
StringelectronVersion
String - The version of electron you are packaging for. Defaults to version of electron
, electron-prebuilt
or electron-prebuilt-compile
dependency.extends
String - The name of a built-in configuration preset or path to config file (relative to project dir). Currently, only react-cra
is supported.react-scripts
in the app dependencies, react-cra
will be set automatically. Set to null
to disable automatic detection.extraMetadata
any - Inject properties to package.json
.readonly
= false
Boolean - Whether to fail if the application is not signed (to prevent unsigned app if code signing configuration is not correct).nodeVersion
String - libui-based frameworks only The version of NodeJS you are packaging for. You can set it to current
to set the Node.js version that you use to run.launchUiVersion
Boolean | String - libui-based frameworks only The version of LaunchUI you are packaging for. Applicable for Windows only. Defaults to version suitable for used framework version.framework
String - The framework name. One of electron
, proton-native
, libui
. Defaults to electron
.afterPack
- The function (or path to file or module id) to be run after pack (but before pack into distributable format and sign).afterSign
- The function (or path to file or module id) to be run after pack and sign (but before pack into distributable format).artifactBuildStarted
module:app-builder-lib/out/configuration.__type | String - The function (or path to file or module id) to be run on artifact build start.artifactBuildCompleted
module:app-builder-lib/out/configuration.__type | String - The function (or path to file or module id) to be run on artifact build completed.afterAllArtifactBuild
- The function (or path to file or module id) to be run after all artifacts are build.onNodeModuleFile
- The function (or path to file or module id) to be run on each node module file.beforeBuild
(context: BeforeBuildContext) => Promise | null - The function (or path to file or module id) to be run before dependencies are installed or rebuilt. Works when npmRebuild
is set to true
. Resolving to false
will skip dependencies install or rebuild.node_modules
are missing, it will not invoke production dependencies check.remoteBuild
= true
Boolean - Whether to build using Electron Build Service if target not supported on current OS.includePdb
= false
Boolean - Whether to include PDB files.removePackageScripts
= true
Boolean - Whether to remove scripts
field from package.json
files.appId
= com.electron.${name}
String - 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.artifactName
String - The artifact file name template. Defaults to ${productName}-${version}.${ext}
(some target can have other defaults, see corresponding options).compression
= normal
“store” | “normal” | “maximum” - 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.files
The files configuration.extraResources
The extra resources configuration.extraFiles
The extra files configuration.asar
= true
AsarOptions | Boolean - Whether to package the application’s source code into an archive, using Electron’s archive format.smartUnpack
= true
Boolean - Whether to automatically unpack executables files.ordering
StringasarUnpack
Array<String> | String - A glob patterns relative to the app directory, which specifies which files to unpack when creating the asar archive.fileAssociations
Array<FileAssociation> | FileAssociation - The file associations.ext
String | Array<String> - The extension (minus the leading period). e.g. png
.name
String - The name. e.g. PNG
. Defaults to ext
.description
String - windows-only. The description.mimeType
String - linux-only. The mime-type.icon
String - The path to icon (.icns
for MacOS and .ico
for Windows), relative to build
(build resources directory). Defaults to ${firstExt}.icns
/${firstExt}.ico
(if several extensions specified, first is used) or to application icon.x-office-document
).role
= Editor
String - macOS-only The app’s role with respect to the type. The value can be Editor
, Viewer
, Shell
, or None
. Corresponds to CFBundleTypeRole
.isPackage
Boolean - macOS-only Whether the document is distributed as a bundle. If set to true, the bundle directory is treated as a file. Corresponds to LSTypeIsPackage
.protocols
Array<Protocol> | Protocol - The URL protocol schemes.name
String - The name. e.g. IRC server URL
.schemes
Array<String> - The schemes. e.g. ['irc', 'ircs']
.role
= Editor
“Editor” | “Viewer” | “Shell” | “None” - macOS-only The app’s role with respect to the type.forceCodeSigning
Boolean - Whether to fail if app will be not code signed.electronUpdaterCompatibility
String - The electron-updater compatibility semver range.publish
The publish options.detectUpdateChannel
= true
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
.generateUpdatesFilesForAllChannels
= false
Boolean - Please see Building and Releasing using Channels.releaseInfo
- The release info. Intended for command line usage:-c.releaseInfo.releaseNotes='new features'
releaseName
String - The release name.releaseNotes
String - The release notes.releaseNotesFile
String - The path to release notes file. Defaults to release-notes-${platform}.md
(where platform
it is current platform — mac
, linux
or windows
) or release-notes.md
in the build resources.releaseDate
String - The release date.target
String | TargetConfigurationpackage.json
.name
String - The application name.description
String - The application description.homepage
String - The url to the project homepage (NuGet Package projectUrl
(optional) or Linux Package URL (required)).https://github.com/${user}/${project}
by default.license
String - linux-only. The license name.author
name
Stringemail
Stringrepository
String | RepositoryInfo - The repository.url
Stringbuild
Configuration - The electron-builder configuration.protonNodeVersion
option to current
or specific NodeJS version that you are packaging for.Currently, only macOS and Linux supported.CFBundleVersion
(macOS) and FileVersion
(Windows) will be set automatically to version.build_number
on CI server (Travis, AppVeyor, CircleCI and Bamboo supported).myAfterPackHook.js
in the project root directory:afterPack
3.5 extra dmg to casters for sale. (see above).afterPack
(see above).afterPack
(see above).