Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
cli, documentation

Hướng nghiên cứu

Bắt đầu với packages/@ionic/cli/src/lib/project/vue/serve.ts và các định nghĩa tùy chọn gần dòng 723 trong definitions.ts, sau đó tái hiện lệnh ionic cap run android được ghi trong tài liệu với --livereload, --external và --public-host. Hoàn tất khi các dự án Vue nhận được cập nhật trực tiếp trên thiết bị mà không cần thêm đối số public-host được chuyển tiếp, đồng thời việc chuyển tiếp các đối số sau -- được ghi trong tài liệu cho capacitor run.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

triage

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

Ngôn ngữ chính
TypeScript
Star
2k
Fork
681
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ionic-team/ionic-cli

Tất cả issue của ionic-team/ionic-cli

Issue tương tự

Thêm issue về TypeScript

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.