Describe the bug
Follow up of #842 -
Function names created by function name transformer of es2015 aren't removed when unused.
To Reproduce
Minimal code to reproduce the bug
function foo() {
return {
a() {}
}
}
Actual Output
If there is no Error thrown,
function foo() {
return {
a: function b() {}
};
}
Expected Output
function foo() {
return {
a: function() {}
};
}
Configuration
babel-minify-cli
babel-minify version: master after #841
babel version : 7.0.0-beta.46
babel-minify-config:
{
removeConsole: true,
keepFnNames: true
}
babelrc:
{
plugins: [],
presets: []
}
Possible solution
Apply the same fix as in #842 - force register the binding (because this binding has been skipped by babel)
Describe the bug
Follow up of #842 -
Function names created by function name transformer of es2015 aren't removed when unused.
To Reproduce
Minimal code to reproduce the bug
Actual Output
If there is no Error thrown,
Expected Output
Configuration
babel-minify-clibabel-minify version: master after #841
babel version :
7.0.0-beta.46babel-minify-config:
babelrc:
Possible solution
Apply the same fix as in #842 - force register the binding (because this binding has been skipped by babel)