Side by side
esbuild vs Google Closure Compiler
Both stand on javascript build tools. Which one you can start free with, which one lets you read the code, and what each costs once you pay.
Free plan AndroidAPILinux+4
esbuild combines bundling and optimization features in free MIT-licensed software. Its lack of TypeScript type checking and limited code splitting are important considerations for project setup.
Visit esbuild Free plan LinuxMacSelf-hosted+1
Closure Compiler combines JavaScript optimization with code checks and offers several ways to integrate it into a workflow. Its documented input restrictions and maintenance status for ES6 import/export are worth considering before adoption.
Visit Google Closure CompilerThe facts
| esbuild | Google Closure Compiler | |
|---|---|---|
| Free plan | Yes | Yes |
| Open source | Not published | Not published |
| Runs on | Android, API, Linux, Mac, Self-hosted, Web, Windows | Linux, Mac, Self-hosted, Windows |
| Lowest paid plan | Free or on request | Free or on request |
| Plans published | 1 | 1 |
| Maker | Not published | Not published |
| Website | esbuild.github.io | developers.google.com |
| On javascript build tools | #1 of 27 | #2 of 27 |
esbuild: what it does well
- Built-in support for JavaScript, CSS, TypeScript, and JSX
- Bundles ESM, CommonJS, and CSS modules
- Includes tree shaking, minification, and source maps
- Interfaces available through CLI, JavaScript, and Go
- MIT-licensed software
What to know first
- Does not type-check TypeScript
- Code-splitting support is described as primitive
- Active feature development is not currently underway
- Primarily built by one developer
Google Closure Compiler: what it does well
- Offers multiple compilation levels
- Checks syntax, references and types
- Available through Java, Bazel and NPM
- Includes a NodeJS API
What to know first
- Building requires Java 21 or later, NodeJS, Git and Bazelisk
- Input restrictions include goog.module() and goog.require()
- ES6 import/export support is not actively maintained
- ADVANCED optimization requires care to preserve behavior
Alternatives to esbuild Alternatives to Google Closure Compiler The whole list
