factor-bundle icon indicating copy to clipboard operation
factor-bundle copied to clipboard

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

Open Bjvanminnen opened this issue 9 years ago • 0 comments

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

Bjvanminnen avatar Jun 01 '15 20:06 Bjvanminnen