1
A
回答
2
當您創建生產JavaScript捆綁包時,DEV
模式會自動關閉。通常,您不需要自己完成此任務,因爲打包程序在運行XCode存檔任務或Android部署時創建捆綁包。
但是,您可以使用react-native bundle --dev=false
命令手動創建捆綁包,例如,
react-native bundle --dev=false --entry-file=index.ios.js --bundle-output=app.jsbundle --platform=ios
的bundle
命令採用以下選項:
react-native bundle [options]
builds the javascript bundle for offline use
Options:
-h, --help output usage information
--entry-file <path> Path to the root JS file, either absolute or relative to JS root
--platform [string] Either "ios" or "android"
--transformer [string] Specify a custom transformer to be used
--dev [boolean] If false, warnings are disabled and the bundle is minified
--bundle-output <string> File name where to store the resulting bundle, ex. /tmp/groups.bundle
--bundle-encoding [string] Encoding the bundle should be written in (https://nodejs.org/api/buffer.html#buffer_buffer).
--sourcemap-output [string] File name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map
--assets-dest [string] Directory name where to store assets referenced in the bundle
--verbose Enables logging
--reset-cache Removes cached files
--read-global-cache Try to fetch transformed JS code from the global cache, if configured.
--config [string] Path to the CLI configuration file
相關問題
- 1. 如何優化打開Android片段的性能?
- 2. React Native - 如何使用AsyncStorage優化應用程序性能
- 3. Air Native Extension中的Java性能,我該如何優化?
- 4. 如何優化R性能
- 5. 在Android圖形中優化性能
- 6. 優化性能
- 7. 如何在Android模擬器上打開react-native開發菜單?
- 8. 反應本機ListView TextInput鎖定從性能優化呈現
- 9. D開關優化可能性(DLang)
- 10. 優化包含圖像的性能react-native組件
- 11. 優化Mgento性能
- 12. RegEx性能優化
- 13. 優化iFrame性能
- 14. Haskell性能優化
- 15. OpenCL性能優化
- 16. 性能優化 - Postgres
- 17. 優化Ext.tree.TreePanel性能
- 18. HttpListener性能優化
- 19. Solr性能優化
- 20. rsyslog性能優化
- 21. grails性能優化
- 22. 優化Actionscript性能
- 23. PHP優化性能
- 24. 優化docx4j性能
- 25. TCPDF優化性能
- 26. Nodejs性能優化
- 27. Android提高SQLite性能優化
- 28. 優化列表視圖性能Android
- 29. Android讀取文件優化性能
- 30. JSF - 如何優化數據庫性能