browserify / browserify/factor-bundle

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

Ouverte
#69 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
397
Forks
24
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
build-system
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.