Skip to content

How to prevent Babel from renaming variable name "a" to "_a" #12067

Answered by nicolo-ribaudo
mayewei asked this question in Q&A
Discussion options

You must be logged in to vote

Variable names aren't semantically observable: even if Babel renames a variable, your program will work the same (ignoring eval, which isn't supported by Babel anyway).

That said, it usually renames a variable only when it's needed. Can you show an example of a becoming _a?

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@mayewei
Comment options

@nicolo-ribaudo
Comment options

@mayewei
Comment options

@nicolo-ribaudo
Comment options

@mayewei
Comment options

Answer selected by mayewei
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants