kzc

Results 96 comments of kzc

> UglifyJS output: `new((new X).Y().z) wrong` Using butternut's copy of `uglify-js` and `uglify-es`... ``` $ node_modules/uglify-js/bin/uglifyjs -V uglify-js 3.0.9 $ echo 'new new X().Y().z' | node_modules/uglify-js/bin/uglifyjs -b new (new X().Y)().z;...

Butternut uglify test harness fix for Safari 10 loop bug: ```patch --- a/test/test.js +++ b/test/test.js @@ -68,7 +68,12 @@ describe('butternut', function () { equal(butternut.squash(code, sample.options).code, code, 'failed idempotency check'); }...

Just curious - which version of node were used to produce those timings? My results are very different with latest butternut 27639ce506848565c3bf42d061aed42519c2f425 node 6.9.0: ``` $ /usr/bin/time node690 bin/squash test/fixture/input/preact.js...

My timings from the command line are pretty cold. :-) Here's the preact numbers from the previous bench in https://github.com/Rich-Harris/butternut/pull/44 ``` preact.js (20.5 kB) without sourcemap: ✓ babili : 8.41...

@Rich-Harris You'll get a kick out of this: Running Closure produced `three.min.js` through Uglify saves additional 1744 bytes uncompressed, 2860 gzipped https://github.com/mrdoob/three.js/issues/11003 Props to @mishoo on the Uglify mangling algorithm.

Hmm. I thought it was primarily due to mangling, but that's not the case. Rather than building it this time, I grabbed the file from a CDN: original size, not...

As far as I know, esbuild cannot convert external "static" commonjs require statements to static esm imports - not even for the side effect free node platform built in modules....

Although this functionality would be better in esbuild itself, here's a super hacky script to transform node built-in `__require()`s in esbuild `esm` output to `import` statements. It only works with...

`require("buffer/")` is a different issue and appears to be working as intended - see https://github.com/evanw/esbuild/commit/b2d7329774fd9c42cb5922a9b5825498b26a28f3.

@jjenzz If you're seeing a bug you should probably open a separate issue for that with a reproducible test case, as it doesn't appear to be related to this issue....