mirror of https://github.com/status-im/metro.git
Remove cached bundle if update fails
Summary: If a bundle failed to build, a file change would trigger the *update bundle* path, without ever being able to resolve the bundle. If a bundle can't be updated, we evict it from the cache. Reviewed By: cpojer Differential Revision: D3726567 fbshipit-source-id: a342f00c5a41364551194c33082718e5483fd7a4
This commit is contained in:
parent
9e20146f7f
commit
a5a087ef44
|
@ -252,6 +252,9 @@ class Server {
|
||||||
deps.outdated.add(filePath);
|
deps.outdated.add(filePath);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}).catch(e => {
|
||||||
|
debug(`Could not update bundle: ${e}, evicting from cache`);
|
||||||
|
delete this._bundles[key];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue