mirror of https://github.com/status-im/metro.git
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
This commit is contained in:
parent
a5a087ef44
commit
599aaead28
|
@ -67,7 +67,7 @@ class Bundle extends BundleBase {
|
||||||
const name = 'require-' + moduleId;
|
const name = 'require-' + moduleId;
|
||||||
super.addModule(new ModuleTransport({
|
super.addModule(new ModuleTransport({
|
||||||
name,
|
name,
|
||||||
id: this._numRequireCalls - 1,
|
id: -this._numRequireCalls - 1,
|
||||||
code,
|
code,
|
||||||
virtual: true,
|
virtual: true,
|
||||||
sourceCode: code,
|
sourceCode: code,
|
||||||
|
|
Loading…
Reference in New Issue