Add option to indicate bundle encoding

Summary: public

To improve cold start performance we want to be able to avoid decoding the bundle at all. To make that happen we need to be able to generate a bundle encoded on `ucs2`. This diff adds support for indicating the encoding the Packager should use for bundling.

Reviewed By: davidaurelio

Differential Revision: D2582365

fb-gh-sync-id: 905384272a668910c57a1a2ca6d1b723c39233f8
This commit is contained in:
Martín Bigio
2015-10-28 13:16:40 -07:00
committed by facebook-github-bot-0
parent 47e791fa3b
commit 15006cf0b4
4 changed files with 12 additions and 3 deletions
+2 -1
View File
@@ -20,11 +20,12 @@ function saveBundleAndMap(
codeWithMap,
platform,
bundleOutput,
encoding,
sourcemapOutput,
assetsDest
) {
log('Writing bundle output to:', bundleOutput);
fs.writeFileSync(bundleOutput, sign(codeWithMap.code));
fs.writeFileSync(bundleOutput, sign(codeWithMap.code), encoding);
log('Done writing bundle output');
if (sourcemapOutput) {