Cordova Plugin Variable to Capacitor

I want to use cordova plugin to my ionic capacitor project. But, some plugins require variables when installing. How to put that variable to my project?

If these Plugins support the --variable, you can simply add them in the Capacitor Config under:


"cordova": { 
  "preferences": { 
    "SOME_VARIABLE": "SOME_VALUE" 
  } 
}

but many Plugins have own scripts which just look into the config.xml File. So you can create a empty one and just add add the Preferences to it.