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

Was this helpful?

Edit on GitHub
  1. Configuration

Makers

Generate platform specific distributables for Electron apps using Electron Forge.

Makers are Electron Forge's way of taking your packaged application and generating platform-specific distributable formats like DMG, AppX, or Flatpak files (amongst others).

Each maker has to be configured in the makers section of your Forge configuration. For example:

module.exports = {
  makers: [
    {
      name: '@electron-forge/maker-zip',
      platforms: ['darwin', 'linux'],
      config: {
        // the config can be an object
      }
    },
    {
      name: '@electron-forge/maker-dmg',
      config: (arch) => ({
        // it can also be a function taking the currently built arch
        // as a parameter and returning a config object, e.g.
      })
    }
  ]
};
// Only showing the relevant configuration for brevity
{
  "config": {
    "forge": {
      "makers": [
        {
          "name": "@electron-forge/maker-zip",
          "platforms": ["darwin", "linux"], // optional
          "config": {
              // Config here
          }
        }
      ]
    }
  }
}

If a Maker supports multiple platforms, you may specify which platforms you want to target. Note that all Makers have logical defaults for the platforms value so you normally don't need to specify that property.

PreviousFuses PluginNextAppX

Last updated 4 months ago

Was this helpful?