-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
i: needs triageoutdatedA 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
💻
- Would you like to work on a fix?
How are you using Babel?
babel-loader (webpack)
Input code
In Babel v7:
import * as parser from "@babel/parser";
import traverse from "@babel/traverse";
import * as t from "@babel/types";
const code = `
export const two = () => {};
export const one = two;
`;
const ast = parser.parse(code, {
sourceType: "module",
});
traverse(ast, {
Identifier(path) {
const binding = path.scope.getBinding('two');
console.log(binding.references);
}
});Produces:
2
2
2
In Babel v8 result is:
1
1
1
Which one is correct?
Configuration file name
No response
Configuration
No response
Current and expected behavior
Expected references to be aligned with Babel v7
Environment
Babel v8 Beta 3
Possible solution
No response
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
i: needs triageoutdatedA 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