NativeScript / NativeScript/NativeScript
Parents expression shows [object Object] with webpack in uglify
Chưa có ai nhận issue này.
- 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
- Clone git project https://github.com/rakeshgirase/ParentAabIssue.git.
- Run the program on android tns run android --env.uglify
- 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:

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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- 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