ionic-team / ionic-team/ionic-cli

Live updates are not sent to device when running ionic cap run with a Vue project

Đang mở
#4,947 0 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ả

**Description:**

When running `ionic cap run android` on an actual device its necessary to specify the ip/host of the development server. This doesn't work as expected when using Vue.

**Steps to Reproduce:**
I expect running with the `--public-host` argument to run the application on the device and have live updates sent to the phone via HRM:
`ionic cap run android --livereload --external --public-host=$EXTERNAL_IP`

This doesn't work because the HMR public host is not also set on the Vue CLI Server. To fix this you must:
`ionic cap run android --livereload --external --public-host=$EXTERNAL_IP -- --public=http://$EXTERNAL_IP:8100`

If attempt to set `--host` flag, it sets both the local and public host and fails with the following log:
```
[INFO] Waiting for connectivity with vue-cli-service...
```

**My `ionic info`:**
```

Ionic:

Ionic CLI : 6.20.4 (/usr/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 6.3.9

Capacitor:

Capacitor CLI : 4.5.0
@capacitor/android : 4.5.0
@capacitor/core : 4.5.0
@capacitor/ios : 4.5.0

Utility:

cordova-res : 0.15.4
native-run : 1.7.1

System:

NodeJS : v14.21.1 (/usr/bin/node)
npm : 6.14.17
OS : Linux 5.15

```

**Other Information:**

Also the `--` argument forwarding should be documented:
https://ionicframework.com/docs/cli/commands/capacitor-run

https://github.com/ionic-team/ionic-cli/blob/87a0dcdfd9f75b91e83c0eb13761d6135b226212/packages/%40ionic/cli/src/definitions.ts#L723

https://github.com/ionic-team/ionic-cli/blob/87a0dcdfd9f75b91e83c0eb13761d6135b226212/packages/%40ionic/cli/src/lib/project/vue/serve.ts#L104

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.