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…
How is the integration with things like a dev server and tools present in create-react-app like react-fast-refresh? Also, in case of working on an Electron project: How well does it handle main/render/preload compile targets and handling of native modules and linking? Electron-forge is, for instance, the recommended toolchain for building Electron apps and the Webpack stuff is a particular pain in the ass.
Esbuild – An extremely fast JavaScript bundler
171–180 of 288 posts
Re: Esbuild – An extremely fast JavaScript bundler
#172Earlier quoted context omitted.
We're using Vite and enjoying it, would you say much of Vite could be replaced with pure esbuild? I guess Vite provides a nice development experience but is built on esbuild.
I guess it depends on your project and workflow preferences. Personally, I'm not a big fan of HMR and the bundling times are negligible even without "pre-bundling" npm dependencies (as Vite puts), so I see little reason for Vite.
The config is beyond minimal. If you're using webpack you may want to look away now :-)
import { resolve } from 'path'
import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
export default defineConfig({
plugins: [reactRefresh()],
build: {
rollupOptions: {
input: {
index: resolve(__dirname, 'index.html'),
}
},
sourcemap: true
},
esbuild: {
jsxInject: `import * as React from "react"`
},
resolve: {
alias: [
{ find: '@', replacement: '/src' },
]
},
})Re: Esbuild – An extremely fast JavaScript bundler
#173Re: Esbuild – An extremely fast JavaScript bundler
#174You know you are getting old when you watch the arrival of the fourth JavaScript build tool of your career. I still remember when everyone was waving goodbye to Gulp in favour of Webpack. Webpack was going to save us all from the hell of massive convoluted gulp.js files. Fast forward five years and it's the same mess it was supposed to avoid. Slow, bloated and confusing. I just switched to esbuild on our main project…
5 if you include grunt. 6 if you include bash/make for using manual scripts to productionize your yui / jqueryUi / mooTools code with uglify/browserify/gcc/etc
Re: Esbuild – An extremely fast JavaScript bundler
#175Re: Esbuild – An extremely fast JavaScript bundler
#176Earlier quoted context omitted.
I came here too say this. The man authored in the neighborhood of 100k LOC in a year, just on this. There's a living 10x dev, it's not a myth. What is ridiculous is to think someone can 10x a normal developer, it's more like the difference between the top few percent and the bottom 10-20%. Evan Wallace is a beast, no doubt.
I really wish people would stop idolising so called '10x' developers. Anyone that is comfortable and familiar with their toolset (e.g. go, .NET, Java, C++) and has a deep understanding of a problem (and has likely solved it once already), can churn out code far, far, faster than an onlooker.
I’ve found that in any tech company, while there are many people that write good code and do a great job, there are always a handful (even at a place like Apple) that truly push the industry forward and in certain directions, partly because of how they see years ahead, partly because they are supremely talented, and partly because they attract other really good talent just to work with them.
And we know many of their names. Folks like Brian Cantrill, Yehuda Katz, Fabrice Bellard, John Carmack, Bret Taylor.
They aren’t just good programmers. They’re constantly dwelling in uncharted territory.
I’m not advocating worshipping them, just stating that their talent and output is hell of a lot more than even 10x.
Re: Esbuild – An extremely fast JavaScript bundler
#177Re: Esbuild – An extremely fast JavaScript bundler
#178Re: Esbuild – An extremely fast JavaScript bundler
#179See also SWC, something similar to esbuild but written in Rust. NextJS uses SWC as well as Deno. Rome is also being rewritten in Rust, it's more of a complete set of packages that subsume Webpack, Babel and all the other parts of the JS / TS development experience.
The announcements from NextJS has been really confusing. I don't think they are using SWC yet. They are just working on it. The reason for the confusion is because they write about the progress in the release notes, making it look like they are using it.
Overall I’m pretty bullish on Rust tooling and integration within the JS/ Wasm ecosystem !
Re: Esbuild – An extremely fast JavaScript bundler
#180Often 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…
And the one guy writing it is Evan Wallace, co-founder and CTO of Figma. I don't know how he has the time!