developit / developit/microbundle

[Feature request] Use sourcemap files from imports

Đang mở
#1,092 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
8.1k
Fork
358
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Using microbundle@0.15.1

In a multistage build (such as when using peggy), I'd like the final output map file to make use of map files declared by imported files. For example, if I run:

```bash
npx peggy --format es --output src/grammar.mjs --source-map src/grammar.mjs.map src/grammar.pegjs
# generates src/grammar.mjs and src/grammar.mjs.map
# src/grammar.mjs ends with `//# sourceMappingURL=grammar.mjs.map`
# src/index.mjs has `import { parse } from "src/grammar.mjs";`
npx microbundle src/index.mjs --compress=false --strict=true --sourcemap=true
```

I'd expect the resultant sourcemap to contain a reference to `../src/grammar.pegjs". Instead, it contains a reference to "../src/grammar.mjs".

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Reproduce the multistage build with src/grammar.pegjs, src/grammar.mjs, src/grammar.mjs.map, and src/index.mjs using the two npx commands in the issue. Trace how microbundle handles the imported sourceMappingURL; done means the resultant sourcemap references ../src/grammar.pegjs instead of ../src/grammar.mjs.

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

Đánh giá

Công nghệ
javascript
Lĩnh vực
build-system
Loại issue
Tính năng
Độ 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.