Fix bundler to not do as many passes in optimization
Reviewed By: davidaurelio Differential Revision: D2876894 fb-gh-sync-id: b652ff77dd442a82c16f3b446c931fb985a2efcd
This commit is contained in:
parent
a61ab8795a
commit
0b39c72bfa
|
@ -135,10 +135,12 @@ module.exports = function () {
|
|||
visitor: {
|
||||
Program(path) {
|
||||
path.traverse(firstPass);
|
||||
while (hasDeadModules(requires)) {
|
||||
var counter = 0;
|
||||
while (hasDeadModules(requires) && counter < 3) {
|
||||
_requires = requires;
|
||||
requires = {};
|
||||
path.traverse(secondPass);
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue