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
electron-prebuilt-compile
installed instead ofelectron
as adevDependency
electron-compile
as adependency
- 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).
.compilerc
Example {
"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"
}
}
}
}