make module IDs deterministic when bundling

Summary:
This makes sure that `getModuleId` is called on modules in the order returned by `node-haste`, rather than waiting for a couple of promises to resolve before calling the function.

Related: #7758

Reviewed By: frantic

Differential Revision: D3450853

fbshipit-source-id: 7f26590b39b94ade32c73a8db9fd31d283d57549
This commit is contained in:
David Aurelio
2016-06-17 12:55:43 -07:00
committed by Facebook Github Bot 6
parent 99e2a67b39
commit 62bb09d1f6
2 changed files with 13 additions and 8 deletions

View File

@@ -13,7 +13,10 @@ const meta = require('./meta');
const writeFile = require('./writeFile');
function buildBundle(packagerClient, requestOptions) {
return packagerClient.buildBundle(requestOptions);
return packagerClient.buildBundle({
...requestOptions,
isolateModuleIDs: true,
});
}
function createCodeWithMap(bundle, dev) {