Closed Electroid closed 1 week ago
We considered using bun instead of esbuild for bundling in our monorepo and tested it on our real codebase. It turned out that esbuild's minified code is 15-30% smaller than bun's minified output.
this issue's title is too board. I am converting it into a tracking issue, with the goal of becoming equal or smaller than esbuild bundles.
The displayed issue of bad codegen in __export is fixed in #12144
This should be an issue label and not one issue.
This is the first few lines of minified code from running
bun build --minify
with 10 copies of Three.js:Notice the
()=>{{ return ??? }}
Where as
esbuild
show the following:Notice the
()=>???
, that is better. We could even make this:_=>???
.How to reproduce:
copy-three.mjs
: