Vite: a wildcard inside an import.meta.glob brace alternative is matched literally

Đang mở
#273 0 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

@FredApps đang làm issue này rồi.

Từ ngày 17/11/2026.

  • #274 của @FredApps — đang mở

Đá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
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript, vite
Lĩnh vực
devtools, testing

Hướng nghiên cứu

Start with globPattern in src/repo/graph.ts and trace how brace alternatives in import.meta.glob patterns are converted for matching. Use the repro in src/registry.test.ts with src/icons/index.ts and src/icons/star-icon.ts; done means changing star-icon.ts selects the registry test instead of reporting no affected tests and fallbackRequired: false.

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

Mô tả

In src/repo/graph.ts, globPattern escapes each {...} alternative of an import.meta.glob pattern as literal text. ./icons/{index,*-icon}.ts matches index.ts only; the files loaded through *-icon have no edge. Changing one selects no tests and does not fall back.

Repro: src/registry.ts with import.meta.glob('./icons/{index,*-icon}.ts', { eager: true }), src/icons/index.ts, src/icons/star-icon.ts, and src/registry.test.ts importing the registry. Change src/icons/star-icon.ts.

Expected: src/registry.test.ts is selected.

Actual: no affected tests, fallbackRequired: false.

Ngôn ngữ chính
TypeScript
Star
0
Fork
4
Merge trung bình
18 giờ 41 phút
Pull request đã merge (30 ngày)
48

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 DiffCI/core

Tất cả issue của DiffCI/core

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.