mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-09 22:50:21 +08:00
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:
committed by
facebook-github-bot-0
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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user