nativerepo.com

ReactNative Packager


Standalone ReactNative Packager without framework code.

node.js react-native react

Do What?

  1. bundle-split, solution from https://github.com/facebook/react-native/pull/10804
  2. use module name as before (ps: core.bundle and app.bundle are different bundle session, so module ids may conflict)

Dependencies

"devDependencies": {
  "rn-packager": "~0.10.0",
  "react-native": "0.39.2",
  "react": "~15.4.0-rc.4"
}

Bundle

Now u can use manifest.json file to generate core modules.

  1. Bundle ur core bundle and output manifest.json
  2. Bundle ur app bundle with manifest.json that Step 1 generated.

Bundle core

$ rnpackager bundle --entry-file node_modules/react-native/Libraries/react-native/react-native.js --bundle-output ~/Dowloads/core.ios.bundle --platform ios --manifest-output core.ios.manifest.json

Bundle app

rnpackager bundle --entry-file foo.js --bundle-output ~/Dowloads/foo.ios.bundle --platform ios --manifest-file core.ios.manifest.json

Server

$ rnpackager start

Demo

$ cd tests
$ npm i
$ rnpackager start

visit:


Comments
Details
Added at: 2017/03/19
Owner: react-component
Category: other
Homepage: https://github.com/react-component/rn-packager#readme
Downloads last month: 1116
Version: 0.11.1
Compatibility

Add to your project

npm i --save rn-packager