Skip to content

Commit f83c869

Browse files
davidaurelioFacebook Github Bot 5
authored andcommitted
Fix module IDs of initial require calls
Summary: The logic of assigning module IDs to the initial require calls of a bundle was faulty, counting up from -1 instead of counting down. This change ensures that IDs are -1, -2, ... Reviewed By: matryoshcow Differential Revision: D3735560 fbshipit-source-id: 89efa3e73b39c2f8bfed8a6a30487733d1a8b145
1 parent ee49dd7 commit f83c869

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packager/react-packager/src/Bundler/Bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Bundle extends BundleBase {
6767
const name = 'require-' + moduleId;
6868
super.addModule(new ModuleTransport({
6969
name,
70-
id: this._numRequireCalls - 1,
70+
id: -this._numRequireCalls - 1,
7171
code,
7272
virtual: true,
7373
sourceCode: code,

0 commit comments

Comments
 (0)