babel-plugin-transform-decorators-legacy
babel-plugin-transform-decorators-legacy copied to clipboard
Incorrect local name w/ native classes & babel-minify
Looks like the local name gets mangled with babel-minify, but not references to it.
- This only happens when classes are not transpiled (eg: no preset, or env preset with
>4%
) and minify is used. - Changing to an expression (
const Foo = @hello class {}
) works, though the name is not mangled - The effect is still present when no decorator is used.
It seems like the outer variable name assigned by the decorators plugin is being mangled when it shouldn't be (since without the decorator it is unmangled).
Input | Output |
---|---|
@hello |
var _class; |