ionic-team / ionic-team/ionic-cli

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

Aberta
#4,593 3 comentários 0 reações 0 responsáveis Ver no GitHub
triage
Linguagem predominante
TypeScript
Estrelas
2k
Forks
682
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

## 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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.