In the Apache Cordova doc (https://cordova.apache.org/docs/en/10.x/guide/platforms/electron/index.html), it is suggested to set "nodeIntegration" to true in settings.json file to use NodeJs and Electron API in the renderer part of my app. However, in the electron doc, this action is not recommended for security reasons, and it is suggested to use a preload script to do so.
Is it possible to do the same with cordova-electron ? Something like this doesn't seems to work :
{
"browserWindow": {
"width": 1024,
"height": 768,
"fullscreen": false,
"frame": false,
"webPreferences": {
"nodeIntegration": false,
"preload": "file://{Directory}/preload.js",
"contextIsolation": true
}
}
The "preload" option isn't read. I'm using cordova 10, with cordova-electron 2.0.
Thanks in advance for any advice. :)