-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
The destructuring generates for the:
var {foo} = require('bar');the following code:
var _require = require('bar');
var foo = _require.foo;The _require var goes to the uids instead of bindings, however, scope.hasBinding returns true since considers uids.
Then our "after" plugin removes the var _require = require('bar'); node, in order to inline the call. However, scope.removeBindings doesn't affect it, since it's not in bindings, but in uids.
We should probably add such generated vars to bindings as well, or to expose scope.removeUid method. And also scope.hasBinding (returns true) is kind of inconsistent after scope.removeBinding (which does nothing in this case).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue