mirror of https://github.com/status-im/metro.git
[react-native] Update graceful-fs and use it in _build_bundle.js
This commit is contained in:
parent
4a423d7bba
commit
1d7b858d74
|
@ -58,14 +58,7 @@ exports.getDependencies = function(options, main) {
|
||||||
function useGracefulFs() {
|
function useGracefulFs() {
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var gracefulFs = require('graceful-fs');
|
var gracefulFs = require('graceful-fs');
|
||||||
|
gracefulFs.gracefulify(fs);
|
||||||
// A bit sneaky but it's not straightforward to update all the
|
|
||||||
// modules we depend on.
|
|
||||||
Object.keys(fs).forEach(function(method) {
|
|
||||||
if (typeof fs[method] === 'function' && gracefulFs[method]) {
|
|
||||||
fs[method] = gracefulFs[method];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function createServer(options) {
|
function createServer(options) {
|
||||||
|
|
Loading…
Reference in New Issue