Skip to content

A basic Hello World boilerplate using Webpack to convert Electron Javascript code to binary using Bytenode and the Bytenode Webpack Plugin

Notifications You must be signed in to change notification settings

degifted/electron-bytenode-example

 
 

Repository files navigation

electron-bytenode-example

NOTE: Bytenote Webpack Plugin is not yet compatible with Webpack 5. See below for how to help.

Example code using Bytenode + Bytenode Webpack Plugin to compile both the render and main processes in an Electron app.

At the command line:

git clone https://github.com/spaceagetv/electron-bytenode-example.git
cd electron-bytenode-example
npm install
npm start

This example uses Herbert Treis Neto's Bytenode Webpack Plugin along with Webpack 4 and Electron Forge Beta.54 or lower to bundle and package the application.

Electron gets pointed at small "loader" files which bundle Bytenode in order to load the binary .jsc files containing the original application code.

NOTES!

  1. You must enable nodeIntegration in your BrowserWindow webPreferences for Bytenode to work in the rendering process. Alternately, you could put your renderer code into a preload script, where Node will be available automatically.
  2. Bytenode Webpack Plugin is NOT YET COMPATIBLE with Webpack 5. So you must use Electron Forge beta.54 or lower (which uses Webpack 4). Reach out to Herbert if you would like to sponsor (or develop) Webpack 5 compatibility for Bytenode Webpack Plugin. That would be a super awesome thing to do!

About

A basic Hello World boilerplate using Webpack to convert Electron Javascript code to binary using Bytenode and the Bytenode Webpack Plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 44.5%
  • JavaScript 35.3%
  • HTML 12.5%
  • CSS 7.7%