ionic-team / ionic-team/ionic-cli

bug: `ionic capacitor run` options conflicts with angular configurations

Abierto
#4,593 3 comentarios 0 reacciones 0 asignados Ver en GitHub
triage
Lenguaje dominante
TypeScript
Estrellas
2k
Forks
682
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

## Bug Report

### Capacitor Version

```
Latest Dependencies:

@capacitor/cli: 2.4.2
@capacitor/core: 2.4.2
@capacitor/android: 2.4.2
@capacitor/electron: 2.4.2
@capacitor/ios: 2.4.2

Installed Dependencies:

@capacitor/cli 2.4.2
@capacitor/android 2.4.2
@capacitor/core 2.4.2
@capacitor/ios 2.4.2
@capacitor/electron not installed

[success] Android looking great! 👌
[success] iOS looking great! 👌
```

### Platform(s)

- [x] iOS
- [x] Android

### Current Behavior

Let's assume the following configuration in `angular.json` :
```json
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "app:build",
"disableHostCheck": true,
"host": "0.0.0.0",
"aot": true,
"ssl": true
},
"dev": {
"proxyConfig": "src/environments/dev/proxy.conf.json"
}
}
```
Now, in case of running the following :
1. `ionic capacitor run --configuration=dev --livereload --external --ssl`
=> everything works fine as both are requiring host=0.0.0.0 and ssl

2. `ionic capacitor run --configuration=dev --livereload --external`
=> the angular local web server will start on `https` (due to the config in angular.json)
=> ionic will think it is on `http` (as the ssl parameter was omitted) and failed to load the web app

3. `ionic capacitor run --configuration=dev --livereload`
=> ionic will pass on `--host=localhost` and override the setting in `angular.json`

### Expected Behavior

If a configuration is passed to `ionic capacitor run` and options like `host` or `ssl` are specified in this configuration, then these options shouldn't be overrided.

### Other Technical Details

`npm --version` output: 6.14.8

`node --version` output: v14.10.1

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.