developit / developit/microbundle

Maybe should compile `node_modules` with babel when use inline dependencies

オープン
#936 コメント 7 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。