Rich Harris

Results 788 comments of Rich Harris

Ha, tricky. I suppose Butternut ought to have an option to disable optimisations around built-in methods anyway...

Ah, yeah. It assumes `sourceType: 'module'` (because otherwise it would fail on `import`/`export`), which *implies* strict mode. Not sure what a good solution to that looks like.

The option is probably the best bet, yeah. > Technically there shouldn't be import/export statements and non-strict feature in the same file anyway, right? Correct — modules are *always* strict....

Yes, that makes sense. I *think* shorthand properties is (currently) the only place where this could happen, so it would probably be handled inside the mangling logic rather than being...

7.8.0. This is using Benchmark.js which is probably somewhat misleading as everything gets warmed up, whereas minifiers usually run cold. I intend to replace the current benchmarks with more realistic...

That's wild! Is that mostly due to the mangling, or is it hard to know?

In the original case: ```js (function (xyz) {}); ``` Since there's no reference to the function, and `arguments` is not used inside it (meaning `arguments.callee` is also unused), we can...

@pygy Could you elaborate?

Yes — anything that isn't defined inside the bundle would be considered strictly off-limits. The theory is that it would be able to trace the object that the property belongs...

Funny you should raise this, it's what I'm currently working on 😀