browserify / browserify/factor-bundle

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

Offen
#69 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
397
Forks
24
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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).

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.