Fábio Santos

Results 321 comments of Fábio Santos

Mocha doesn't take 4 seconds to initialise in this case. I changed your test to do `require('assert').equal(1, 112)` and it took less than 200ms: ``` fabio@fabio-thinkpad ♥ time mocha index.spec.js...

Just copied the original test 50 times to make sure. Results: ``` real 0m0.193s user 0m0.157s sys 0m0.040s ```

`e` is redeclared in the render function, and that's the `e` used in `e=window`. What error occurs when this code runs?

The value of that property is unused. If it's used somewhere, the property access will be retained. For example: `console.log(this.foo?.bar)` The incomplete `this.foo` remains, because `this` might be undefined, and...

I see! In that case, set the compress option `pure_getters` to `true`. When set to true, it doesn't remove unused property access.

I meant `pure_getters: false` because your getter isn't pure. But, it appears that it doesn't do what we would expect.

This is very problematic. `reduce_funcs` should also refuse to inline into tricky areas like loops and try-catch.

What a tiny change! I think now all that's left is finding out what assumptions are made in `inline_into_call`. If inline_into_call expects its function's contents to execute synchronously (due to...

This it should also have an `&& !awaited`, I think: https://github.com/terser/terser/pull/1569/files#diff-6d9466a3590c1b557f26efa43a6ebb7ffba283d899b618511a6d1bfbfefe0f34L367

I found a reproduction with less compress options enabled: ```js /* minify options: { module: true, compress: { defaults: false, reduce_vars: true, unused: true, pure_getters: true, }, mangle: false, }...