Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

electron-userland/electron-forge-plugin-compile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REPOSITORY OBSOLETE

This repository has been merged into Electron Forge proper as of version 6.

What follows is the original README.md:


Electron Forge Plugin Compile

A plugin for Electron Forge that brings first class electron-compile support to your build pipeline.

Usage

npm i @electron-forge/plugin-compile --save-dev
// forge.config.js
const { CompilePlugin } = require('@electron-forge/plugin-compile')

module.exports = {
  // other config here
  plugins: [new CompilePlugin()]
}

Project Setup

In order for this plugin to work correctly you need to have a few things in place

  1. electron-prebuilt-compile installed instead of electron as a devDependency
  2. electron-compile as a dependency
  3. A correctly configured .compilerc in the root of your project, an example is included below

Once your project is setup and the plugin added to your configuration, everything should Just Work(tm).

Example .compilerc

{
  "env": {
    "development": {
      "application/javascript": {
        "presets": [
          ["env", { "targets": { "electron": "1.8" } }],
          "react"
        ],
        "plugins": ["transform-async-to-generator"],
        "sourceMaps": "inline"
      }
    },
    "production": {
      "application/javascript": {
        "presets": [
          ["env", { "targets": { "electron": "1.8" } }],
          "react"
        ],
        "plugins": ["transform-async-to-generator"],
        "sourceMaps": "none"
      }
    }
  }
}

About

Electron Compile plugin for Electron Forge

Resources

Stars

Watchers

Forks

Packages

No packages published