A common part of applications is importing assets, such as images, fonts, and files.
In the context of ERB, build-time assets are those that are managed by Webpack. They are imported like JS modules and transformed to encoded strings by Webpack.
Out of the box, ERB supports the following assets:
In the context of ERB, run-time assets are separate files that are included in the packaged application and used through file paths. You will need to include their locations in
package.json['build']['files']. This is so that electron-builder's configuration knows to include them when packaging.
(Note that these locations are relative to the
For example, you can include Python within your electron app and call it at run-time to print
Hello World from Python.
A useful tip is using
asar (the format that
electron-builder packages into) to see the contents of the packaged build. You will see that it contains content included within