Live data from Hacker News

Esbuild – An extremely fast JavaScript bundler

esbuild.github.io

271–280 of 288 posts

Re: Esbuild – An extremely fast JavaScript bundler

#271

Earlier quoted context omitted.

ESBuild’s author and docs[1] are quite clear about its future scope: > [… a list of features that are already done…] > After that point, I will consider esbuild to be relatively complete. I'm planning for esbuild to reach a mostly stable state and then stop accumulating more features. This will involve saying "no" to requests for adding major features to esbuild itself. I don't think esbuild should become an all-in-o…

"Weakness: since ESBuild doesn’t expose its AST, plugins are often slow which can undermine the benefits of the tool" I think by the time we even care about the performance of a plugin being "golang" fast, we will have rome built in rust. Rome will be the full kit and caboodle at native speeds (bundler, tree shaking compiler, linter, type checker, etc...), whereas esbuild will be the rome-lite for when you just want…

> I think by the time we even care about the performance of a plugin being "golang" fast

I certainly care about it being faster than estree-*/babel. There are a lot of static analysis and optimization things I’d like to do that are slow enough in JS to negate a lot of ESBuild’s advantage.

> we will have rome built in rust.

> Rome will be the full kit and caboodle at native speeds (bundler, tree shaking compiler, linter, type checker, etc...), whereas esbuild will be the rome-lite for when you just want to bundle some code and have it done.

Is Rome-Rust doing something special to optimize arbitrary AST-based plugins written in JS? I hadn’t heard that but I’d be interested if it is.

Re: Esbuild – An extremely fast JavaScript bundler

#272

Why is it so fast? Mainly because: - It's written in Go and compiles to native code. [...] While esbuild is busy parsing your JavaScript, node is busy parsing your bundler's JavaScript. By the time node has finished parsing your bundler's code, esbuild might have already exited and your bundler hasn't even started bundling yet. [...] Go is designed from the core for parallelism while JavaScript is not. - Parallelism…

Even in single threaded mode it’s fast. I think the main idea is that it creates an AST only a couple of times and then caches it so that the AST can be reused. Webpack on the other hand gets engulfed by its plugins which often do so multiple times.

Re: Esbuild – An extremely fast JavaScript bundler

#273
post #110

Often overlooked things when discussing esbuild here: 1. It's not just a faster replacement for a single %tool_name% in your build chain: for the vast majority of cases, it's the whole "chain" in a single cli command if you're doing it right. That is, you don't just stick it inside, say, webpack as a faster replacement for babel (although you can). No, you look carefully through your webpack configs and its myriad of…

> 3. The most impressive part about esbuild development is not just that it's one guy writing it: it is the level of support and documentation he manages to provide alongside. And the one guy writing it is Evan Wallace, co-founder and CTO of Figma. I don't know how he has the time!

Massively impressive!

Re: Esbuild – An extremely fast JavaScript bundler

#274

Earlier quoted context omitted.

CTO and lead developer on a focused project are very different jobs - my guess would be he relaxes from the very strategy and soft-skill heavy day job by diving into a challenging problem that keeps his dev chops up and lets him focus on a finite problem.

So working a shit ton then.

No idea on Evan Wallace's perspective but there is a possibility that it isn't seen as work. It would like be me solving sudoku or some of my friends building LEGOs or solving extremely hard jigzaw puzzles

Re: Esbuild – An extremely fast JavaScript bundler

#275

Earlier quoted context omitted.

So working a shit ton then.

No idea on Evan Wallace's perspective but there is a possibility that it isn't seen as work. It would like be me solving sudoku or some of my friends building LEGOs or solving extremely hard jigzaw puzzles

I understand that because it's often how I feel when I'm doing programming work. However, I would still consider that time spent working.

Re: Esbuild – An extremely fast JavaScript bundler

#276

Earlier quoted context omitted.

How is the SCSS performance? I've tried just about every trick in the book in an attempt to get our bootstrap-based SCSS projects to compile faster, and I'm at my wits end with it. Any chance you can share your config?

My project is small and it's amazing fast to me as well. It's basically just outsource its job to another cli. I used esbuild-plugin-sass This is the gist https://gist.github.com/v9n/c40a6ad2078d09dd86117924b415b7fb As far as I know, esbuild has no intention to integrate with CSS and will outsorce it to plugin. I used

Thank you so much for sharing!

I'll give this a shot really quick

Re: Esbuild – An extremely fast JavaScript bundler

#277

Earlier quoted context omitted.

I take your point, but I think you could fairly say that JS has been going through growing pains since its inception 25 years ago. It's always been a fast-moving, inconsistently-implemented language. (E.g. Netscape / Mozilla vs. IE support for browser features). Maybe things are going to calm down a bit? I could believe it. But I just don't see the churn stopping. The browser-as-OS is going to keep getting new featur…

>when everybody starts using wasm I would say this is a far off possibility. The need to write WASM code rarely surfaces for the average SPA, and really seems like its more applicable to games or sites with heavy processing needs. For better or worse, it's going to be JS/TS for a long while yet.

I avoided this fact for years, running from JS/TS for “better languages”. After a stint with Haskell I’ve decided the grass isn’t that much greener so just accepting that JS is what it is - one of the worlds most popular languages which can run in most places and therefore worth learning.

Re: Esbuild – An extremely fast JavaScript bundler

#278

Earlier quoted context omitted.

Something a lot of people don’t appreciate is that the past ten years have been an anomaly for JavaScript. They’ve been very tumultuous because there was a ton of evolving that suddenly needed to happen. And I think we’re nearing the end. Babel was necessary because core syntaxes were changing so fast. Webpack’s sprawling nature was needed because there were so many alternate dialects, module systems to support, etc.…

This is a great point. A "Cambrian explosion" the likes of which the JS ecosystem experienced over the last 10-15 years will slow down eventually. Curious to hear whether other folks agree or not.

Yeah, it’s a great point. I always assumed that there was so much tool churning just because of the nature of the front-end itself as a target for building software.

However I think the “Cambrian explosion” point here makes a lot of sense.

Re: Esbuild – An extremely fast JavaScript bundler

#279

Earlier quoted context omitted.

SWC in NextJS is still in canary with experimental settings, but it took me 3 lines of code yesterday to make it work on a fairly large app ( https://labelflow.ai ). Hot reload times instantly went from 10s to 1s. Twitter discussion here https://twitter.com/vlecrubier/status/1448371633673187329?s=... Overall I’m pretty bullish on Rust tooling and integration within the JS/ Wasm ecosystem !

could you provide a link on how to enable this experimental setting ? thank you.

https://github.com/swc-project/swc/discussions/2097#discussi...

- Run yarn add next@canary

- Add to your next.config.js:

    experimental: {
        swcMinify: true,
        swcLoader: true
    }

Re: Esbuild – An extremely fast JavaScript bundler

#280

Earlier quoted context omitted.

I take your point, but I think you could fairly say that JS has been going through growing pains since its inception 25 years ago. It's always been a fast-moving, inconsistently-implemented language. (E.g. Netscape / Mozilla vs. IE support for browser features). Maybe things are going to calm down a bit? I could believe it. But I just don't see the churn stopping. The browser-as-OS is going to keep getting new featur…

>when everybody starts using wasm I would say this is a far off possibility. The need to write WASM code rarely surfaces for the average SPA, and really seems like its more applicable to games or sites with heavy processing needs. For better or worse, it's going to be JS/TS for a long while yet.

Perhaps I used the wrong phrase with “just around the corner”. My prediction would be that we’ll see major SPAs in wasm in ~3-5 yrs.

This is not imminent from a developer’s perspective, but I think it is close on the “language evolution” timescale. As in, soon enough that I’m not sure we will have a long period where JS stabilizes before wasm revolutionizes it again.

Not a high-confidence prediction either way though.

Post reply on HN