Electron Forge
  • Getting Started
  • Importing an Existing Project
  • CLI
  • Core Concepts
    • Why Electron Forge?
    • Build Lifecycle
  • Configuration
    • Configuration Overview
    • TypeScript Setup
    • Plugins
      • Webpack Plugin
      • Vite Plugin
      • Electronegativity Plugin
      • Auto Unpack Native Modules Plugin
      • Local Electron Plugin
      • Fuses Plugin
    • Makers
      • AppX
      • deb
      • DMG
      • Flatpak
      • pkg
      • RPM
      • Snapcraft
      • Squirrel.Windows
      • WiX MSI
      • ZIP
    • Publishers
      • Bitbucket
      • Electron Release Server
      • GitHub
      • Google Cloud Storage
      • Nucleus
      • S3
      • Snapcraft
    • Hooks
  • Built-in Templates
    • Webpack
    • Webpack + Typescript
    • Vite
    • Vite + TypeScript
  • Guides
    • Code Signing
      • Signing a Windows app
      • Signing a macOS app
    • Custom App Icons
    • Framework Integration
      • React
      • React with TypeScript
      • Vue 3
    • Developing with WSL
  • Advanced
    • Auto Update
    • Debugging
    • Extending Electron Forge
      • Writing Plugins
      • Writing Templates
      • Writing Makers
      • Writing Publishers
    • API Docs
Powered by GitBook
On this page
  • Motivation
  • Value proposition
  • Forge vs. Builder

Was this helpful?

Edit on GitHub
  1. Core Concepts

Why Electron Forge?

An overview of Forge and its role in shipping Electron apps.

PreviousCLINextBuild Lifecycle

Last updated 10 months ago

Was this helpful?

Motivation

Application packaging and distribution has always been handled outside of the core Electron framework. In Electron's early days as a part of the , it was common for app developers to prepare their application for distribution by manually editing the Electron binary.

Since then, the Electron community has developed a rich ecosystem of tools to handle every task for Electron app distribution, including:

  • Application packaging (electron-packager)

  • Code signing (e.g. @electron/osx-sign)

  • Creating platform-specific installers (e.g. electron-winstaller or electron-installer-dmg).

  • Native Node.js module rebuilding (electron-rebuild)

  • Universal macOS builds (@electron/universal)

Although these single-purpose packages are mature and production-ready, application developers need to understand what each one does and write their own scripts to glue the packages together into a build pipeline. This process requires research and iteration, and can be confusing for folks who are new to Electron.

Value proposition

Electron Forge is an all-in-one solution that unifies this fractured ecosystem. With Forge, you can create a build pipeline that brings your app from development to distribution with minimal configuration.

Forge is also built with advanced use cases in mind—you can add any build logic you need with custom plugins, makers or publishers. For more details, see the Extending Electron Forge section of the docs.

Forge vs. Builder

Electron Forge can be considered an alternative to , which fulfills the same use-case for application building and publishing.

The key difference in philosophy between the two projects is that Electron Forge focuses on combining existing first-party tools into a single build pipeline, while Builder rewrites its own in-house logic for most build tasks.

We believe there are two main advantages to using Forge:

  1. Forge's multi-package architecture makes it easier to understand and extend. Since Forge is made up of many smaller packages with clear responsibilities, it is easier to follow the flow of the code. Also, its extensible API design means that you can write your own build logic separate from the provided configuration options for advanced use cases.

Forge receives new features for application building as soon as they are supported in Electron (e.g. or ). These features are built with first-party Electron tooling in mind, so Forge receives them as soon as they are released.

Atom editor
Electron Builder
ASAR integrity
universal macOS builds