Skip to content

Commit 112bdc9

Browse files
davidaurelioFacebook Github Bot
authored andcommitted
Add --indexed-unbundle flag to force iOS ra-bundle format
Summary: This adds a new flag to the `unbundle` command: `--indexed-unbundle` allows to output the indexed file format even when building for android. Reviewed By: cpojer Differential Revision: D4189485 fbshipit-source-id: e56192456de764eb38c25b574ceaaf52eb8a6fca
1 parent a9338d6 commit 112bdc9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

local-cli/bundle/output/unbundle/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function saveUnbundle(bundle, options, log) {
2323
// we fork here depending on the platform:
2424
// while android is pretty good at loading individual assets, ios has a large
2525
// overhead when reading hundreds pf assets from disk
26-
return options.platform === 'android' ?
26+
return options.platform === 'android' && !options.indexedUnbundle ?
2727
asAssets(bundle, options, log) :
2828
asIndexedFile(bundle, options, log);
2929
}

local-cli/bundle/unbundle.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@ module.exports = {
2323
name: 'unbundle',
2424
description: 'builds javascript as "unbundle" for offline use',
2525
func: unbundle,
26-
options: bundleCommandLineArgs,
26+
options: bundleCommandLineArgs.concat({
27+
command: '--indexed-unbundle',
28+
description: 'Force indexed unbundle file format, even when building for android',
29+
default: false,
30+
}),
2731
};

0 commit comments

Comments
 (0)