[Typo]: React Compiler Vite installation docs with "vite-plugin-babel" cause sourcemap issues
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 11.8k
- Fork
- 7.9k
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 11
Mô tả
Summary
When following the setup instructions for React Compiler on the current live docs site, if using a custom Vite Babel plugin + React SWC or React Router v7 framework mode, you will notice that if a component gets optimized by React Compiler, the sourcemaps appear to have some React Compiler-optimized code paths in them, making dev debugging more difficult.
Page
https://react.dev/learn/react-compiler/installation
Details
Please see reproduction repository for specific details: https://github.com/andrew-locklair-fs/react-vite-compiler-repro
Screenshot demonstrating sourcemaps appropriately added with default config:
Screenshot demonstrating sourcemaps not added when using the custom vite-plugin-babel:
Happy to dig into this more, but hoping that it's as simple as just turning the relevant sourcemaps option ON for the custom Vite Babel plugin. I ran into this converting a RRv7 framework mode repo to add React Compiler, and the instructions seem to leave out sourceMaps: true in babelConfig.
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
Bắt đầu với trang cài đặt React Compiler và repository react-vite-compiler-repro được liên kết. Kiểm tra thiết lập plugin Babel tùy chỉnh cho Vite và babelConfig của nó, sau đó xác minh liệu sourceMaps: true có giải quyết được khác biệt sourcemap đã được báo cáo hay không trước khi cập nhật hướng dẫn cài đặt nếu điều này được xác nhận.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- babel, javascript, react, vite
- Lĩnh vực
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- 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
- 48/100