developit / developit/microbundle
Maybe should compile `node_modules` with babel when use inline dependencies
- 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ả
Now microbundle is use `exclude: 'node_modules/**'` to create babel config, I think it's reasonable when not inline dependencies.
But if use inline dependencies... this options maybe is weird?
```typescript
// foo/bar.js (in node_modules)
module.exports = {a: ()=>console.log('1')}
```
```typescript
// My module
import abc from 'foo/bar.js';
window.de = abc
export const b = () => {
console.log('2')
}
```
Then add `foo` module to `devDependencies`.
Result:
```typescript
window.de={a:()=>console.log("1")};var o=function(){console.log('2')};export{o as b};
```
If i use inline dependencies mean **i hope it's part of mine module**, my modules arrow function has compile (it's right) but `foo` modules has nothing change.
Maybe should not set `exclude: 'node_modules/**'` when use inline dependencies?
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
Bắt đầu bằng cách tái hiện ví dụ về dependency inline bằng foo/bar.js và module My, sau đó theo dõi cách cấu hình Babel áp dụng exclude: 'node_modules/**'. So sánh đầu ra của dependency và arrow function cục bộ. Hoàn tất có nghĩa là các dependency inline nhận được quá trình biên dịch Babel như dự kiến mà không thay đổi hành vi của các dependency không inline.
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, tooling
- Loại issue
- Lỗi
- Độ 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