ionic-team / ionic-team/ionic-cli

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

Đang mở
#4,593 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
2k
Fork
682
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.