Fábio Santos

Results 281 comments of Fábio Santos

Hello! Thanks for reporting. The properties in this list aren't mangled by default: https://github.com/terser/terser/blob/master/tools/domprops.js And apparently connectedCallback isn't there indeed. A quick google of the webcomponents API revealed `attributeChangedCallback` which...

This is an old, known issue. I can't find the old issue to link it here though. It can be fixed by letting the size calculation part of Terser know...

Not really. There are good repros in this thread but I'm not sure it's an easy fix. This isn't caused by the `inline` option anymore though.

Actually it *is* an easy fix because it's always strings. So if the typeof the evaluated *thing* is a string, it can be measured against the original expression.

There was a bug hanging out near the fix for this so I can't merge the simple fix right away.

I've been creating a "cold code" optimization step, where code that appears to only run once, is optimized differently. It's a nice place to put this. If there's some proof...

Very interesting results! Seems like a viable option. I see it as having two modes, 'cold' and 'all'. 'cold' would apply only to top-level non-loop code which we can assume...

Also is_constant doesn't return `true` for anything that has an identity. Here "num" can be inlined safely into the return (provided it's the only use case): ``` const num =...