@gfean/react-native-bundle-drop 0.1.34 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLIENT_README.md +6 -0
- package/README.md +6 -0
- package/lib/loadConfig.js +5 -2
- package/package.json +1 -1
package/CLIENT_README.md
CHANGED
|
@@ -8,6 +8,12 @@ yarn add @gfean/react-native-bundle-drop
|
|
|
8
8
|
cd ios && pod install && cd ..
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
Add the Android bootstrap side-effect import (resolver patches):
|
|
12
|
+
```js
|
|
13
|
+
// index.js (entry)
|
|
14
|
+
import '@gfean/react-native-bundle-drop/bootstrap';
|
|
15
|
+
```
|
|
16
|
+
|
|
11
17
|
## 2) App config
|
|
12
18
|
Add `bundle.drop.config.js` to your project root:
|
|
13
19
|
```js
|
package/README.md
CHANGED
|
@@ -8,6 +8,12 @@ yarn add @gfean/react-native-bundle-drop
|
|
|
8
8
|
cd ios && pod install && cd ..
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
Add the Android bootstrap side-effect import once (images resolver patch):
|
|
12
|
+
```js
|
|
13
|
+
// index.js (or entry file)
|
|
14
|
+
import '@gfean/react-native-bundle-drop/bootstrap';
|
|
15
|
+
```
|
|
16
|
+
|
|
11
17
|
## Prerequisites
|
|
12
18
|
- `bundle.drop.config.js` in your app root:
|
|
13
19
|
```js
|
package/lib/loadConfig.js
CHANGED
|
@@ -5,8 +5,11 @@ const react_native_1 = require("react-native");
|
|
|
5
5
|
// Simpler, fixed path load to match the prior behavior.
|
|
6
6
|
function loadConfig() {
|
|
7
7
|
try {
|
|
8
|
-
//
|
|
9
|
-
|
|
8
|
+
// Metro resolves this relative to the compiled file location:
|
|
9
|
+
// node_modules/@gfean/react-native-bundle-drop/lib/loadConfig.js
|
|
10
|
+
// so we walk four levels up to the app root.
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
12
|
+
const cfg = require('../../../../bundle.drop.config.js');
|
|
10
13
|
if (!cfg?.serverUrl || !cfg?.project?.slug || !cfg?.org?.slug) {
|
|
11
14
|
throw new Error('bundle.drop.config.js missing serverUrl, org.slug or project.slug');
|
|
12
15
|
}
|