mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 14:13:26 +00:00
overload createFileLoader
with custom source URL
Reviewed By: javache Differential Revision: D4553755 fbshipit-source-id: 867685c67c53d4a659029f012e386a7be420d0ec
This commit is contained in:
parent
a141e63ee4
commit
b64de27a62
@ -41,10 +41,16 @@ public abstract class JSBundleLoader {
|
||||
* passing large strings from java to native memorory.
|
||||
*/
|
||||
public static JSBundleLoader createFileLoader(final String fileName) {
|
||||
return createFileLoader(fileName, fileName);
|
||||
}
|
||||
|
||||
public static JSBundleLoader createFileLoader(
|
||||
final String fileName,
|
||||
final String assetUrl) {
|
||||
return new JSBundleLoader() {
|
||||
@Override
|
||||
public String loadScript(CatalystInstanceImpl instance) {
|
||||
instance.loadScriptFromFile(fileName, fileName);
|
||||
instance.loadScriptFromFile(fileName, assetUrl);
|
||||
return fileName;
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user