I have an electron application.
My package.json has some app-specific settings like serverUrl
, type_of_application
etc. I am using these settings in the application.
When building an application with electron-builder
I want to override these configs key values with different values.
I will be building same application with different serverUrl
for different type_of_application
. Also there is possibility that these will be installed on same machine so I also want to change package name
and productName
key values for different builds.
So my target is to have separate config files with all these settings to build application with different settings. And when building I will use one of the the config file and that should override default configs in package.json
file.
One possibility is to have complete package.json for different kind of builds, but in that case dependencies
etc. keys will also be duplicated which will be hard to manage when a new dependency is added.
Is there any way I can achieve this?