使用react-native bundle制作离线包

公司项目以离线包的方式使用react-native开发。
相关命令:

react-native bundle --entry-file index.ios.js --bundle-output ./ios/main.jsbundle --platform ios

相关参数可以使用如下命令查询:

react-native bundle -help

也可以将命令添加到package.json文件中方便使用:

"scripts": {
    "iosbundle": "react-native bundle --entry-file index.ios.js --bundle-output ./ios/main.jsbundle --platform ios",
}

下次打包运行:

npm run iosbundle

你可能感兴趣的:(react-native)