mirror of https://github.com/status-im/metro.git
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
9fb1762784
commit
82d4cbe7dd
|
@ -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