mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
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:
committed by
facebook-github-bot-0
parent
47e791fa3b
commit
15006cf0b4
@@ -41,10 +41,11 @@ describe('saveBundleAndMap', () => {
|
||||
saveBundleAndMap(
|
||||
codeWithMap,
|
||||
'ios',
|
||||
bundleOutput
|
||||
bundleOutput,
|
||||
'utf8',
|
||||
);
|
||||
|
||||
expect(fs.writeFileSync.mock.calls[0]).toEqual([bundleOutput, code]);
|
||||
expect(fs.writeFileSync.mock.calls[0]).toEqual([bundleOutput, code, 'utf8']);
|
||||
});
|
||||
|
||||
it('should save sourcemaps if required so', () => {
|
||||
@@ -55,6 +56,7 @@ describe('saveBundleAndMap', () => {
|
||||
codeWithMap,
|
||||
'ios',
|
||||
bundleOutput,
|
||||
'utf8',
|
||||
sourceMapOutput
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user