cdv-electron-settings.json ignored
See original GitHub issueBug Report
Maybe I misunderstood something, but no matter what I change in :
platform_www/cdv-electron-settings.json
e.g.:
{
"browserWindow": {
"height": 600,
"webPreferences":{
"devTools": false,
"nodeIntegration": false
},
"width": 1000
}
}
the command
cordova run electron
always uses it’s default values (and thus shows devtools). I can only avoid that, if I comment the line mainWindow.webContents.openDevTools();
in index.js
Am I missing something, or is this a bug?
Version information
Cordova 9.0.0 MacOS 10.14.4 node v11.7.0
Checklist
- [x ] I searched for existing GitHub issues
- [x ] I updated all Cordova tooling to most recent version
- [x ] I included all the necessary information above
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Electron Platform Guide - Apache Cordova
Electron Platform Guide. Electron is a framework that uses web technologies (HTML, CSS, and JS) to build cross-platform desktop applications.
Read more >Cordova Electron
Electron is a framework that uses web technologies (HTML, CSS, and JS) to build cross-platform desktop applications. Cordova Electron. System Requirements.
Read more >electron-store - npm
This module handles that for you, so you can focus on building your app. The data is saved in a JSON file named...
Read more >Update json file with Environment Variable - Compiling ENV ...
That way, we can just inject ENV that are set in the CI/CD tool into the json dynamically according to build pipeline. First,...
Read more >Can Visual Studio Code be configured to launch electron
json points to. Using the configuration below in my launch.json file, pressing F5 both launched Electron with my app and connected the debugger ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think it’s gonna be swapped. The
debug
build is typically meant for debugging and it’s expected that users are probably going to use the Dev Tools. Plus, we use the same flags across other platforms in Cordova too.You might be looking at the old documentation. To disable the build process you should use
--nobuild
flag.cordova run electron --nobuild
Please, refer to the Cordova documentation.
We do not recommend modifying any files in the
platform/
directory. Normally, theplatform
directory should never be committed to any versioning control service. Modifying will make platform upgrades impossible.If you want to change the Electron’s
browserWindow
settings, we expect you to create a JSON file anywhere in a folder that is safe to be versioned, for example,res/electron
, and then define theElectronSettingsFilePath
preference option to theconfig.xml
file.However, with regards to the
devTools
option, we do not accept the user define value. This option is overridden by the Cordova CLI flag--debug
(default) or--release
.If you do not want the Dev Tools visible, build or run with the
--release
flag.