Improvements to the packager for very large projects
Summary: Here are some small fixes for issues we've encountered with very large RN projects (mostly huge dependency trees in `node_modules`). cc amasad martinbigio Closes https://github.com/facebook/react-native/pull/4880 Reviewed By: svcscm Differential Revision: D2782834 Pulled By: mkonicek fb-gh-sync-id: e316a62b84ba796b80ac819431414ebf27f7b566
This commit is contained in:
parent
c74d6403f5
commit
1b80007236
|
@ -49,6 +49,10 @@ function runServer(args, config, readyCallback) {
|
|||
readyCallback();
|
||||
}
|
||||
);
|
||||
// Disable any kind of automatic timeout behavior for incoming
|
||||
// requests in case it takes the packager more than the default
|
||||
// timeout of 120 seconds to respond to a request.
|
||||
serverInstance.timeout = 0;
|
||||
}
|
||||
|
||||
function getAppMiddleware(args, config) {
|
||||
|
|
|
@ -13,7 +13,7 @@ const sane = require('sane');
|
|||
const Promise = require('promise');
|
||||
const exec = require('child_process').exec;
|
||||
|
||||
const MAX_WAIT_TIME = 25000;
|
||||
const MAX_WAIT_TIME = 120000;
|
||||
|
||||
// TODO(amasad): can we use watchman version command instead?
|
||||
const detectingWatcherClass = new Promise(function(resolve) {
|
||||
|
|
|
@ -293,11 +293,11 @@ class File {
|
|||
}
|
||||
|
||||
getFiles() {
|
||||
const files = [];
|
||||
let files = [];
|
||||
Object.keys(this.children).forEach(key => {
|
||||
const file = this.children[key];
|
||||
if (file.isDir) {
|
||||
files.push(...file.getFiles());
|
||||
files = files.concat(file.getFiles());
|
||||
} else {
|
||||
files.push(file);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue