Hi, babel-minify is sweet, although it doesn't appear to have support for decorators like MobX's @observable. It would be great to have this support when you release Babel7 support.
It appears that MinifyPlugin (which uses babel-minify under the hood) breaks when decorators are enabled, even though Babel supports them without minification (and no browser errors).
In the example below, the code compiles with MinifyPlugin but causes a browser error on load: SyntaxError: Identifier 't' has already been declared.
The only fixes that work are mangle:false, which bloats the JS, or removing decorators entirely. I tried using @babel/core@7.2.2 and babel-minify@0.6.0-alpha.5 (and 0.5.0), but nothing seems to work.
Hi, babel-minify is sweet, although it doesn't appear to have support for decorators like MobX's
@observable
. It would be great to have this support when you release Babel7 support.It appears that MinifyPlugin (which uses babel-minify under the hood) breaks when decorators are enabled, even though Babel supports them without minification (and no browser errors).
In the example below, the code compiles with MinifyPlugin but causes a browser error on load:
SyntaxError: Identifier 't' has already been declared
.The only fixes that work are
mangle:false
, which bloats the JS, or removing decorators entirely. I tried using @babel/core@7.2.2 and babel-minify@0.6.0-alpha.5 (and 0.5.0), but nothing seems to work.I used this .babelrc:
and this webpack: