RN: Options to Preload Bundles on Startup

Reviewed By: achen1

Differential Revision: D4809513

fbshipit-source-id: a9a4196b72b241faf7c788e26b9e6880cecebb3e
This commit is contained in:
Tim Yung 2017-04-02 08:38:12 -07:00 committed by Facebook Github Bot
parent f1371ec24c
commit e1466da1eb
1 changed files with 3 additions and 3 deletions

View File

@ -518,7 +518,7 @@ class Server {
});
}
_useCachedOrUpdateOrCreateBundle(options: BundleOptions): Promise<Bundle> {
useCachedOrUpdateOrCreateBundle(options: BundleOptions): Promise<Bundle> {
const optionsJson = this.optionsHash(options);
const bundleFromScratch = () => {
const building = this.buildBundle(options);
@ -683,7 +683,7 @@ class Server {
};
debug('Getting bundle for request');
const building = this._useCachedOrUpdateOrCreateBundle(options);
const building = this.useCachedOrUpdateOrCreateBundle(options);
building.then(
p => {
if (requestType === 'bundle') {
@ -784,7 +784,7 @@ class Server {
_sourceMapForURL(reqUrl: string): Promise<SourceMap> {
const options = this._getOptionsFromUrl(reqUrl);
const building = this._useCachedOrUpdateOrCreateBundle(options);
const building = this.useCachedOrUpdateOrCreateBundle(options);
return building.then(p => p.getSourceMap({
minify: options.minify,
dev: options.dev,