esbuild
Extremely fast JavaScript and TypeScript bundler
TLDR
SYNOPSIS
esbuild [options] [entrypoints_...]
DESCRIPTION
esbuild is an extremely fast JavaScript and TypeScript bundler and minifier. Written in Go, it's 10-100x faster than traditional bundlers like webpack or Parcel.The tool handles bundling, minification, code splitting, tree shaking, and transpilation. It supports JSX, TypeScript, and modern JavaScript features without configuration.esbuild's speed makes it ideal for development builds and as a lower-level tool in build pipelines.
PARAMETERS
ENTRYPOINTS_
Input files to process.--bundle
Bundle dependencies.--outfile FILE
Output file path.--minify
Minify output.--watch
Rebuild on changes.--serve [PORT]
Start development server.--platform PLATFORM
Target: browser, node, neutral.--sourcemap
Generate source maps.--target VERSION
JavaScript target version, e.g. es2020 or chrome100.--outdir DIR
Output directory (use instead of --outfile when there are multiple outputs).--format FORMAT
Output module format: iife, cjs or esm.--loader:.ext=loader
How to load a given file extension (js, ts, jsx, json, text, base64, dataurl, file, ...).--define:K=V
Substitute a global identifier with a constant expression at build time.--external:pkg
Exclude a package from the bundle and leave the import in place.--splitting
Enable code splitting (esm format only).--metafile FILE
Write a JSON file describing the build, for bundle analysis.--help
Display help information.
INSTALL
CAVEATS
Plugin ecosystem smaller than webpack. Some transformations not supported. Configuration differs from other bundlers. May need plugins for complex setups.
HISTORY
esbuild was created by Evan Wallace (co-founder of Figma) and released in 2020. Its dramatic speed improvement over existing tools came from being written in Go with parallelization.
