console.log(TEST); // should be transformed
function fn() {
let TEST = "test"; // should not be transformed
console.log(TEST); // should not be transformed
}
Currently, will be transformed into:
console.log("replaced");
function fn() {
let "replaced" = "test"; // an error will be thrown here
console.log("replaced");
}
Here is a babel config:
Transform the code below:
Currently, will be transformed into:
Similar to #69 , an error will be thrown.