developit / developit/microbundle
Maybe should compile `node_modules` with babel when use inline dependencies
- 主要語言
- JavaScript
- 星號
- 8.1k
- 分支
- 358
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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?
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
先使用 foo/bar.js 和 My 模組重現內嵌相依性範例,接著追蹤 Babel 設定如何套用 exclude: 'node_modules/**'。比較該相依性與本機箭頭函式的輸出。當內嵌相依性獲得預期的 Babel 編譯,同時不改變非內嵌相依性的行為時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- build-system, tooling
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100