Object-property set to boolean true gets minified to !(functiondeclaration)
3iMichael opened this issue · 1 comments
3iMichael commented
A simplified example of the code that caused this:
var testData = { name: "myName", boolValue: true } function func() { doSomething(); }
This (along with a LOT of other code which I can't post here) got minified to something like:
var testData = { name: "myName", boolValue: !(function func(){doSomething()}) }
Since !(functionDeclaration) evaluates to false, this is not correct. I hope someone who knows how this minifier works can find the reason for this mixup.
alexander-akait commented
@3iMichael we just wrapper of uglify-es
, looks as bug in uglify-es
, also uglify-es
is abandoned, use https://github.com/webpack-contrib/terser-webpack-plugin (webpack@5 will use this plugin for uglify). Sorry we can't do nothing here.