browserify / browserify/factor-bundle

Circular dependencies in common bundle, even if unique to single entry point

オープン
#69 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
397
フォーク
24
PR マージ指標
30日以内にマージされた PR はありません

説明

Consider the following situation

```
// shared.js
console.log('hello from shared');
----------
// entry1.js
require('./shared');
----------
// entry2.js
require('./shared');
require('./one');
----------
// one.js
require('./two');
----------
// two.js
require('./three');
----------
// three.js
require('./one')
```

I have two entry points that share some code. One of my entry points has some code that isn't shared, but results in a circular dependency.

I would expect that the circular dependency in non-common code end up in the entry point specific output file, but instead it is ending up in the common file. If I remove the circular dependency, it ends up in the entry point specific output file (as I would expect).

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

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

調査の方向性

Reproduce the report with shared.js, entry1.js, entry2.js, one.js, two.js, and three.js as shown, then compare the common and entry-specific bundle outputs with and without the circular dependency. Done means the cycle from the non-shared entry remains in that entry's output while only shared code is placed in the common bundle.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
build-system
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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