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
  • Installation
  • Usage

Was this helpful?

Edit on GitHub
  1. Configuration
  2. Plugins

Local Electron Plugin

Integrate a local build of Electron into your Forge app.

PreviousAuto Unpack Native Modules PluginNextFuses Plugin

Last updated 3 months ago

Was this helpful?

This plugin should only be used by people who are building Electron locally themselves. If you want to use a fork of Electron, check out the you can use to configure @electron/get.

This plugin allows you to both run and build your app using a local build of Electron. This can be incredibly useful if you want to test a feature or a bug fix in your app before making a PR up to the Electron repository.

If you want to set up a local build of Electron, you should check out .

Installation

npm install --save-dev @electron-forge/plugin-local-electron

Usage

Once you have a working build of Electron, point the plugin's electronPath config option to the folder containing the built Electron binary.

All possible configuration options are documented in .

forge.config.js
{
  plugins: [
    {
      name: '@electron-forge/plugin-local-electron',
      config: {
        electronPath: '/Users/me/projects/electron/out/Testing'
      }
    }
  ]
}

Please note that the plugin only accepts absolute paths. You should use Node's to make things deterministic.

environment variables
Electron Build Tools
LocalElectronPluginConfig
path.resolve()