Force local builds to use regular JS bundles
Reviewed By: dcaspi Differential Revision: D5824552 fbshipit-source-id: a435fc0ad5b43a8bd3c6a873a4147c4d92190f4e
This commit is contained in:
parent
6e281798e8
commit
6b733a4fe7
|
@ -157,7 +157,16 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
|||
case facebook::react::ScriptTag::RAMBundle:
|
||||
break;
|
||||
|
||||
case facebook::react::ScriptTag::String:
|
||||
case facebook::react::ScriptTag::String: {
|
||||
#if RCT_ENABLE_INSPECTOR
|
||||
NSData *source = [NSData dataWithContentsOfFile:scriptURL.path
|
||||
options:NSDataReadingMappedIfSafe
|
||||
error:error];
|
||||
if (sourceLength && source != nil) {
|
||||
*sourceLength = source.length;
|
||||
}
|
||||
return source;
|
||||
#else
|
||||
if (error) {
|
||||
*error = [NSError errorWithDomain:RCTJavaScriptLoaderErrorDomain
|
||||
code:RCTJavaScriptLoaderErrorCannotBeLoadedSynchronously
|
||||
|
@ -165,7 +174,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
|||
@"Cannot load text/javascript files synchronously"}];
|
||||
}
|
||||
return nil;
|
||||
|
||||
#endif
|
||||
}
|
||||
case facebook::react::ScriptTag::BCBundle:
|
||||
if (runtimeBCVersion == JSNoBytecodeFileFormatVersion || runtimeBCVersion < 0) {
|
||||
if (error) {
|
||||
|
|
Loading…
Reference in New Issue