ionic-team / ionic-team/ionic-cli

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

オープン
#4,947 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
triage
主要言語
TypeScript
スター
2k
フォーク
682
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。