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

Provided `jsx.module` in root `rescript.json` does not work

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 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
Ít trao đổi
Công nghệ
javascript
Lĩnh vực
compilers

Hướng nghiên cứu

Tái hiện lỗi bằng các tệp rescript.json của root và package, pnpm rescript build, cùng các tệp @rescript/react RescriptReactErrorBoundary.res và .resi. Theo dõi cách jsx.module được đọc và truyền trong trình biên dịch; được xem là hoàn tất khi thiết lập root hoạt động đối với mã nguồn của các dependency và cấu hình ở cấp package được xử lý nhất quán mà không có các lỗi JSXExt.

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

Mô tả

In monorepo, I define this in the root rescript.json:

    "jsx": {
        "version": 4,
        "module": "JSXExt"
    }

It works for local packages, but it fails to compile with the following errors from @rescript/react dependency:

Log
❯ Building ReScript packages: $ pnpm rescript build [@ Draftist]
[1/3] 🧹 Cleaned previous build due to compiler update
[1/3] 🧹 Cleaned 0/0 in 0.43s
[2/3] 🧱 Parsed 873 source files in 5.05s
[3/3] ❌ Compiled 156 modules in 0.73s

  We've found a bug for you!
  /Users/Alex/Dev/Draftist/node_modules/@rescript/react/src/RescriptReactErrorBoundary.res:40:1-44:36

  38 │ `)
  39 │
  40 │ @react.component @val
  41 │ external make: (
  42 │   ~children: React.element,
  43 │   ~fallback: params<'error> => React.element,
  44 │ ) => React.element = "ErrorBoundary"
  45 │

  The module or file JSXExt can't be found.
  - If it's a third-party dependency:
    - Did you add it to the "dependencies" or "dev-dependencies" in rescript.json?
  - Did you include the file's directory to the "sources" in rescript.json?



  We've found a bug for you!
  /Users/Alex/Dev/Draftist/node_modules/@rescript/react/src/RescriptReactErrorBoundary.resi:13:1-14:97

  11 │ }
  12 │
  13 │ @react.component
  14 │ let make: (~children: React.element, ~fallback: params<'error> => React
     │ .element) => React.element
  15 │

  The module or file JSXExt can't be found.
  - If it's a third-party dependency:
    - Did you add it to the "dependencies" or "dev-dependencies" in rescript.json?
  - Did you include the file's directory to the "sources" in rescript.json?

Setting jsx config in package's rescript.json does not work - compiler ignores it.

Ngôn ngữ chính
OCaml
Star
7.5k
Fork
485
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
65

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 rescript-lang/rescript

Tất cả issue của rescript-lang/rescript

Issue tương tự

Thêm issue về Compilers

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.