Fábio Santos
Fábio Santos
The reason this isn't implemented yet is that the "node API" doesn't actually import any nodejs modules such as "fs", so it's not actually coupled to node. The CLI function...
Hey there! Implementing this would require flow analysis, which Terser does not have. It would only work if the optimization was for `new Animal().run()` (where `Animal` only used once) or...
Terser *could* start doing that, but I don't think it's worth the effort because I don't think people create classes, just to instantiate them only once, and at the same...
If flow analysis was a thing (I'm working on this right now for a new minifier) then it could solve less niche cases of unused methods and it would be...
This is because computed property access is slower than just accessing the property with a dot. This is something Terser could do, but I don't think it should because people...
Interesting results on chrome, but on firefox, there's still a clear performance penalty. Maybe what we're seeing is an optimisation of computed object access using a constant, on chrome and...
This is actually caused by the global variable access `EventTarget`. It makes the class side-effectful. By letting the `unused` option pick apart the `extends` bit of the class, I was...
`__proto__` could be tricky too.
I'm convinced. This could be an option mode="safe" in property mangling, which would keep a string table up on top of the file. But it would require `--toplevel` or `--module`...
How did you get Terser to optimize that to true or false? I'm assuming you used the define option perhaps?