NativeScript / NativeScript/NativeScript

Parents expression shows [object Object] with webpack in uglify

Đang mở
#7,449 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

bug os: android
Ngôn ngữ chính
TypeScript
Star
25.7k
Fork
1.7k
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
35

Mô tả

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.4.2
  • Cross-platform modules: 5.4.3
  • Android Runtime: 5.4.0
  • iOS Runtime: Couldn't test this on ios
  • Plugin(s): NA

Describe the bug

The parent expression shows [object Object] when the project is ran with --env.uglify flag. For example following code snippet in the Label doesn't work as expected:

<span text="{{$parents['ListView']._people, $parents['ListView']._people.length }}" />

To Reproduce

  1. Clone git project https://github.com/rakeshgirase/ParentAabIssue.git.
  2. Run the program on android tns run android --env.uglify
  3. Please add if this is a same case on ios as well!

Expected behavior
The list should show Person 1 of 12 but it shows Person 1 of [object Object]. Following is how the resulting list looks:
Screenshot_20190702-195150

Sample project

https://github.com/rakeshgirase/ParentAabIssue.git

Additional context
If you enable useLegacyWorkflow in nsconfig.json then it works fine. This issue is only in webpack.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

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

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

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.

Hướng nghiên cứu

Tái hiện vấn đề bằng cách chạy project mẫu được liên kết với tns run android --env.uglify, sau đó so sánh với thiết lập useLegacyWorkflow trong nsconfig.json. Theo dõi đường dẫn webpack/uglify liên quan đến việc đánh giá biểu thức cha. Được xem là hoàn tất khi danh sách hiển thị Person 1 of 12 với webpack/uglify cũng như với legacy workflow.

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

Đánh giá

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

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.