mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
RN: Options to Preload Bundles on Startup
Reviewed By: achen1 Differential Revision: D4809513 fbshipit-source-id: a9a4196b72b241faf7c788e26b9e6880cecebb3e
This commit is contained in:
parent
f1371ec24c
commit
e1466da1eb
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user