You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
We try to use a different configuration file for the ionic-cli sync command. We need this, cause we have different stages and want to configure our app different for production.
The documentation says, that there is an option "--configuration=<conf>" to specify the configuration to use. https://ionicframework.com/docs/cli/commands/capacitor-sync#advanced-options
But this isn't working.
The sync command always use the config "capacitor.config.json" and not our specified configuration file. I always check the capacitor.config.json in android/app/src/main/assets/capacitor.config.json - its not changing.
Am I doing something completely wrong? Thanks for any help!
Tobias
Steps to Reproduce:
Just add another config file: "capacitor.config.test.json"
Try to use this configuration with the sync command: "ionic capacitor sync android --configuration=capacitor.config.test.json"
Output:
The sync will NOT use the "capacitor.config.test.json".
$ ionic info
Ionic:
Ionic CLI : 5.4.16 (C:\Users\v121139\AppData\Local\Yarn\Data\global\node_modules\ionic)
Ionic Framework : @ionic/angular 5.3.4
@angular-devkit/build-angular : 0.901.12
@angular-devkit/schematics : 9.1.12
@angular/cli : 9.1.12
@ionic/angular-toolkit : 2.3.3
Capacitor:
Capacitor CLI : 2.4.2
@capacitor/core : 2.4.2
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : not available
Cordova Plugins : not available
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v10.16.3 (D:\Programme\node-v10.16.3-win-x64\node.exe)
npm : 6.9.0
OS : Windows 10
Environment:
HTTP_PROXY : http://localhost:3128/
http_proxy : http://localhost:3128/
HTTPS_PROXY : http://localhost:3128
https_proxy : http://localhost:3128
Done in 12.16s.
Other Information:
Here is the command with --verbose. The configuration is set BUT at the end the wrong config is copied: "√ Copying capacitor.config.json in 3.33ms"
ionic capacitor sync android --configuration=capacitor.config.test.json --verbose
ionic:lib Terminal info: { ci: false, shell: 'C:\\WINDOWS\\system32\\cmd.exe', tty: true, windows: true } +0ms
ionic:lib CLI global options: { _: [ 'capacitor', 'sync', 'android' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, configuration: 'capacitor.config.test.json', projec
t: null, '--': [] } +4ms
ionic:lib:project Project type from config: @ionic/angular (angular) +0ms
ionic:lib:project Project details: { configPath: 'D:\\mcd-app\\mcd-app-ui\\ionic.config.json', errors: [], context: 'app', type: 'angular' } +0ms
ionic Context: { binPath: 'C:\\Users\\v121139\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\ionic\\bin\\ionic', libPath: 'C:\\Users\\v121139\\AppData\\Local\\Yarn\\Data\\global\\node_modules\\ionic', execPath: 'D:\\mcd-app\\m
cd-app-ui', version: '5.4.16' } +0ms
ionic:lib:telemetry Sending telemetry for command: 'ionic capacitor sync' [ 'android',
ionic:lib:telemetry '--verbose',
ionic:lib:telemetry '--interactive',
ionic:lib:telemetry '--color',
ionic:lib:telemetry '--configuration=capacitor.config.test.json' ] +0ms
> capacitor.cmd sync android
√ Copying web assets from build to android\app\src\main\assets\public in 3.23s
√ Copying native bridge in 2.79ms
√ Copying capacitor.config.json in 3.33ms
Found 1 Cordova plugin for android
cordova-plugin-fingerprint-aio (3.0.1)
√ copy in 3.34s
√ Updating Android plugins in 13.21ms
Found 1 Capacitor plugin for android:
capacitor-secure-storage-plugin (0.4.0)
Found 1 Cordova plugin for android
cordova-plugin-fingerprint-aio (3.0.1)
√ update android in 107.76ms
Sync finished in 3.471s
Done in 7.32s.
The text was updated successfully, but these errors were encountered:
--configuration is for the Angular configuration to use during the web asset build. The help output probably makes this clearer: ionic cap sync --help.
If you're interested, there is an active PR for supporting capacitor.config.js files, so multiple config files wouldn't be necessary: ionic-team/capacitor#3756
Description:
We try to use a different configuration file for the ionic-cli sync command. We need this, cause we have different stages and want to configure our app different for production.
The documentation says, that there is an option "--configuration=<conf>" to specify the configuration to use. https://ionicframework.com/docs/cli/commands/capacitor-sync#advanced-options
But this isn't working.
The sync command always use the config "capacitor.config.json" and not our specified configuration file. I always check the capacitor.config.json in android/app/src/main/assets/capacitor.config.json - its not changing.
Am I doing something completely wrong? Thanks for any help!
Tobias
Steps to Reproduce:
Output:
The sync will NOT use the "capacitor.config.test.json".
My
ionic info
:Other Information:
Here is the command with --verbose. The configuration is set BUT at the end the wrong config is copied: "√ Copying capacitor.config.json in 3.33ms"
The text was updated successfully, but these errors were encountered: