Closed BenLaKnet closed 9 months ago
👋 Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
I found a solution:
const browserWindowOpts = Object.assign({}, cdvElectronSettings.browserWindow, { icon: appIcon });
browserWindowOpts.webPreferences.nodeIntegration = true;
//browserWindowOpts.webPreferences.preload = path.join(app.getAppPath(), 'www/cdv-electron-preload.js');
browserWindowOpts.webPreferences.preload = path.join(__dirname, 'cdv-electron-preload.js');
browserWindowOpts.webPreferences.contextIsolation = true;
Preflight Checklist
Issue Details
I have this error message when I tried to package app
Unable to load preload script: /xxx/platforms/electron/Mon Glucko-mas-x64/Mon Glucko.app/Contents/Resources/app/www/cdv-electron-preload.js
I tried to modify cdv-electron-main.js, tried to modify electron-version, but nothing is running.
I used this command to package:
electron-packager ./ "Mon Glucko" --platform=mas --electron-version=28.0.0 --app-bundle-id=com.monglucko.app --overwrite --icon="icon.icns"
The electron source code is based on cordova.