solvable.
It turns out that devDependencies are omitted by default by default, which means that the electron-prebuild-compile package "left the game" for the packaged application, and without it ES6 cannot be compiled. Therefore, in order to deactivate this default behavior, I had to call the packager command with the --no-prune flag so that devDependencies would remain without deletion:
electron-packager . MyCoolApp --platform=linux --arch=x64 --no-prune
In addition, I had to introduce a new script (let him call it: es6-init.js ) to initialize the main script application in order to βcompileβ the code before rendering (it should be used as the main script entry point of your application):
var appRoot = path.join(__dirname, '..'); require('electron-compile').init(appRoot, require.resolve('./main'));
Literature:
source share