forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ReactNative] Make it easier to generate offline bundles
Summary: This helps generating offline bundles by adding almost empty main.jsbundle to the app. The only thing left is to fetch minified bundle from server and save it to the file, then flip the switch in AppDelegate. I'll add docs about this soon. facebook#240 Test Plan: Did the `curl` command from comments. Changed URL to be local file, started SampleApp, works fine without server.
- Loading branch information
Showing
3 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Offline JS | ||
// To re-generate the offline bundle, run this from root of your project | ||
// $ curl 'http://localhost:8081/Examples/SampleApp/index.ios.bundle?dev=false&minify=true' -o iOS/main.jsbundle | ||
|
||
throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions'); |