The recommended way to install esbuild is to install the native executable using npm.
npm install esbuild
There are also some other ways—mostly not recommended, unnecessary complicated, performance issues, supported plugins—to install:
Bundling for the browser: The bundler outputs code for the browser by default, so no additional configuration is necessary to get started. You probably also want to configure the target environment for the browsers you support. All of that might looks something like this:
esbuild app.jsx --bundle --minify --sourcemap --target=chrome58,firefox57,safari11,edge16
esbuild app.js --bundle --platform=node --target=node10.4
Esbuild is extremely fast, way faster than other module bundlers, there are couple reasons for that:
Everything in esbuild is written from scratch. There are a lot of performance benefits with writing everything yourself instead of using 3rd-party libraries, having performance in mind from the beginning.
Memory is used efficiently. The benefit of Go is that it can store things as compactly in memory, which enables it to use less memory and fit more in the CPU cache.
Each one of these factors is only a somewhat significant speedup, but together they can result in a bundler that is multiple orders of magnitude faster than other bundlers commonly in use today.