diff --git a/react-packager/src/AssetServer/index.js b/react-packager/src/AssetServer/index.js index f03196cc..589bded7 100644 --- a/react-packager/src/AssetServer/index.js +++ b/react-packager/src/AssetServer/index.js @@ -28,9 +28,11 @@ function timeoutableDenodeify(fsFunc, timeout) { }; } -const stat = timeoutableDenodeify(fs.stat, 15000); -const readDir = timeoutableDenodeify(fs.readdir, 15000); -const readFile = timeoutableDenodeify(fs.readFile, 15000); +const FS_OP_TIMEOUT = parseInt(process.env.REACT_NATIVE_FSOP_TIMEOUT, 10) || 15000; + +const stat = timeoutableDenodeify(fs.stat, FS_OP_TIMEOUT); +const readDir = timeoutableDenodeify(fs.readdir, FS_OP_TIMEOUT); +const readFile = timeoutableDenodeify(fs.readFile, FS_OP_TIMEOUT); const validateOpts = declareOpts({ projectRoots: {