Hacker News new | ask | show | jobs
by privatenumber 1931 days ago
esbuild has flipped the JS community on its head. Not only as an impressive JS bundler, but through all the next gen tooling esbuild is powering.

For example, you can now speed up your Webpack build with esbuild by replacing babel-loader/ts-loader/Terser: https://github.com/privatenumber/esbuild-loader

(It also blows my mind that Evan is the CTO is Figma. How is he so productive!?)

3 comments

> (It also blows my mind that Evan is the CTO is Figma. How is he so productive!?)

When Evan first joined Figma, he saw how much time the engineers spent on waiting for webpack and fighting JS configuration files. Then one time, during an outage, the developers tried to push a fix but the build was failing because babel-deduplicate-int had changed their API interface but only did a minor version bump when published to NPM, and Figma engineers are at the edge of technology so they use version ranges, not fixed versions.

When Evan heard this he pored up some whisky and created esbuild in two nights. And the JS developers rejoiced. Now the developers were so productive, that Evan already had nothing to do. No one was fighting, all engineers were happy and playing ping-pong like any everyday was Friday.

So now the only thing keeping all the JS engineers happy at Figma, is the continued success and improvement of esbuild. So Evan just spends his time with esbuild now.

(This is all fictional, of course)

> (This is all fictional, of course)

Haha, you really had me going with that first paragraph. Felt so real.

Yeah that's a red flag "all work stops while executive does x then all processes must change to revolve around x"
It worked out ok for linux and git.
i said on twitter that esbuild is the best possible ad for working for figma that they could have ever done. (if this is what they do for fun... imagine what they do at work, etc).

arguably he's doing his job just working on this thing all by himself

Is this pretty much a drop in replacement for babel-loader or does it lack certain features?

Edit: Kind of. It was really simple to switch over and build. But the optimizer example actually makes my output much larger than the webpack default settings. Also it can't seem to handle the "implicitly assume I have React in scope for each JSX file."

It felt maybe twice as fast, but not 10-100x to really game change my dev loop.

We switched two weeks ago and the drop was a bit more than half the total time we had with Webpack in development and a bit bigger drop in production builds.

Our bundle got noticeably smaller, but we chalked that up to esbuild not polyfilling for as early a target as we had been with babel-loader.