react-native-bundle-manager
v0.70.5
Published
Allows to set packager host or load remote bundle via https URL.
Downloads
80
Readme
react-native-bundle-manager
Allows to change packager host ip Allows to load ja bundle from remote CDN via URL. Useful for testing a Metro bundler running remotely.
Installation
yarn add react-native-bundle-manager
Android
in android/app/src/main/java/<yourAppId>/MainApplication.java
find line private final ReactNativeHost mReactNativeHost
Replace instance of new ReactNativeHost(this) {
on new ReactNativeBundleManagerHost(this) {
Usage
import BundleManager from 'react-native-bundle-manager';
// Set your host ip on which `react-native start` is launched
BundleManager.setPackagerHost('192.168.1.10:8081')
// Or call the `load` method explictly in your own prompt:
BundleManager.load('https://some-remote-url/bundle.js');