Multiple entry bundles
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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, rollup, typescript
- Lĩnh vực
- build-system, tooling
Hướng nghiên cứu
Bắt đầu với ví dụ microbundle được liên kết và chạy microbundle -f cjs src/*.ts --no-compress, sau đó so sánh dist/c.js được tạo với đầu ra mong đợi trong issue. Được xem là hoàn tất khi giữ lại các câu lệnh require('./a') và require('./b') cho các bundle có nhiều entry, đồng thời tránh phát ra các phần mở rộng .ts.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi. I'm following the example provided here in order to bundle 3 different modules. The thing is that one of this modules requires the others, but when running microbundle -f cjs src/*.ts --no-compress the output doesn't preserve the require statements and instead bundle the dependencies inline.
I've created an example here https://github.com/nachaos/microbundle-example
Current output (using microbundle@0.13.0)
// /dist/c.js
var a = 'a';
var b = 'b';
var lib = 'lib';
var c = function c(_c) {
return "" + a + b + _c + " - " + lib;
};
exports.c = c;
//# sourceMappingURL=c.js.map
Expected output
// /dist/c.js
var a = require('./a');
var b = require('./b');
var lib = 'lib';
var c = function c(_c) {
return "" + a + b + _c + " - " + lib;
};
exports.c = c;
//# sourceMappingURL=c.js.map
Is there a way to configure microbundle in order to get what I expect?
Also, when trying with microbundle@0.12.3 this is the output. The require statements are preserved but with .ts file extensions, causing the usage of the module to fail.
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var a_ts = require('./a.ts');
var b = _interopDefault(require('./b.ts'));
var lib = 'lib';
var c = function c(_c) {
return "" + a_ts.a + b + _c + " - " + lib;
};
exports.c = c;
//# sourceMappingURL=c.js.map
- 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
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
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.
Issue khác của developit/microbundle
-
CSS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
developit/microbundle#1002 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
developit/microbundle#789 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
developit/microbundle#1100 · 4 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
developit/microbundle#1094 · 1 bình luận ·
-
Disable minification by default Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
developit/microbundle#1093 · 3 bình luận · 1 reaction ·
Tất cả issue của developit/microbundle
Issue tương tự
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Improve Title Support Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
georgestephanis/p2026#40 ·
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·