Read OSS

evanw/esbuild

3 articles

Prerequisites

01

esbuild Architecture: How a Go Bundler Achieves Extreme Speed

A high-level overview of esbuild's architecture, directory structure, and the two-phase build pipeline that makes it orders of magnitude faster than JavaScript-based bundlers.

02

The Scan Phase: Parallel Parsing and Module Graph Construction

Deep dive into how esbuild builds the module graph during the scan phase, covering the streaming lexer, two-pass parser, concurrent scanner, and module resolution.

03

The Linker: Tree Shaking, Code Splitting, and Chunk Generation

A detailed walkthrough of the linker pipeline that transforms the module graph into output files through graph cloning, import/export resolution, tree shaking, and parallel chunk generation.