Skip to content

Commit 631b4fc

Browse files
authored
Merge pull request #154 from callstack/fix/default-bundle-filename
fix: explicitly specify jsBundleAssetPath to fix loading of JS bundle in release mode on RN 0.81 & 0.82
2 parents 632fab5 + ff9b047 commit 631b4fc

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

android/src/main/java/com/callstack/reactnativebrownfield/ReactNativeBrownfield.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class ReactNativeBrownfield private constructor(val reactHost: ReactHost) {
7777
packageList = (options["packages"] as? List<*> ?: emptyList<ReactPackage>())
7878
.filterIsInstance<ReactPackage>(),
7979
jsMainModulePath = options["mainModuleName"] as? String ?: "index",
80+
jsBundleAssetPath = options["bundleAssetPath"] as? String ?: "index.android.bundle",
8081
useDevSupport = options["useDeveloperSupport"] as? Boolean
8182
?: ReactBuildConfig.DEBUG,
8283
jsRuntimeFactory = null

docs/JAVA.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ Params:
7575
Available options:
7676
- `useDeveloperSupport`: `Boolean` - Flag to use dev support.
7777
- `packages`: `List<ReactPackage>` - List of your React Native Native modules.
78-
- `mainModuleName`: `String` - Path to react native entry file.
78+
- `mainModuleName`: `String` - Path to react native entry file (when loading from Metro).
79+
- `jsBundleAssetPath`: `String` - Path to react native bundle asset file (when loading from app assets), appended to `asset://`.
7980

8081
Examples:
8182

docs/KOTLIN.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ Params:
5858
Available options:
5959
- `useDeveloperSupport`: `Boolean` - Flag to use dev support.
6060
- `packages`: `List<ReactPackage>` - List of your React Native Native modules.
61-
- `mainModuleName`: `String` - Path to react native entry file.
61+
- `mainModuleName`: `String` - Path to react native entry file (when loading from Metro).
62+
- `jsBundleAssetPath`: `String` - Path to react native bundle asset file (when loading from app assets), appended to `asset://`.
6263

6364
Examples:
6465

0 commit comments

Comments
 (0)