Add this line to your application's
And then execute:
Or install it yourself as:
bundle add webpacker-electron
Finally, run the following to install Webpacker::Electron:
bundle exec rails webpacker:install:electron
This command will create the following files:
config/electron-builder.yml: Configuration file for
config/webpack/electron/main/development.js: Configuration file for Electron's main process (in development mode).
config/webpack/electron/main/production.js: Configuration file for Electron's main process (in production mode).
config/webpack/electron/renderer/development.js: Configuration file for Electron's renderer process (in development mode).
config/webpack/electron/renderer/production.js: Configuration file for Electron's renderer process (in production mode).
public/electron.html: Template for the renderer process, for both webpack dev server and production build.
It also updates the following files:
config/webpack/environment.js: Ignore Electron's related packs.
It also installs the following packages:
bundle exec rails webpacker:start:electron
This task will run a webpack dev server for the renderer pack. Also, it will run
rails webpacker:start:electron:main to start the actual Electron app.
Package the Electron app
First, it will compile the main and renderer packs for Electron, and then it will put the resulting output in an Electron app using
The app will be generated in
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.