Remove function-name transform.

This transform takes the liberty of renaming local variables so they
don't collide with the names of functions and function-valued
properties, which doesn't seem even remotely safe to me, especially
considering that function.name is merely a convenience for several other
ways of getting the name of the current function, and has not proven to
be a widely used ECMAScript feature.

This transform can be added back via .babelrc if desired, as long as you
don't mind your variables being renamed.
This commit is contained in:
Ben Newman
2016-11-07 20:36:25 -05:00
parent e71691ecd7
commit 152b8eb7e9
2 changed files with 0 additions and 2 deletions

View File

@@ -19,7 +19,6 @@ module.exports = {
[require("babel-plugin-transform-es2015-for-of"), {
loose: true
}],
require("babel-plugin-transform-es2015-function-name"),
require("babel-plugin-transform-es2015-literals"),
require("babel-plugin-transform-es2015-object-super"),
require("babel-plugin-transform-es2015-parameters"),

View File

@@ -20,7 +20,6 @@
"babel-plugin-transform-es2015-computed-properties": "^6.8.0",
"babel-plugin-transform-es2015-destructuring": "^6.16.0",
"babel-plugin-transform-es2015-for-of": "^6.8.0",
"babel-plugin-transform-es2015-function-name": "^6.9.0",
"babel-plugin-transform-es2015-literals": "^6.8.0",
"babel-plugin-transform-es2015-object-super": "^6.8.0",
"babel-plugin-transform-es2015-parameters": "^6.17.0",