Babel vs Closure Compiler: What are the differences?
Some of the features offered by Babel are:
- Array comprehensions
- Arrow functions
- Async functions
On the other hand, Closure Compiler provides the following key features:
- transpiling some ECMAScript 6 code to ECMAScript 3
Babel and Closure Compiler are both open source tools. Babel with 33.5K GitHub stars and 3.57K forks on GitHub appears to be more popular than Closure Compiler with 4.99K GitHub stars and 918 GitHub forks.
What is Babel?
What is Closure Compiler?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
What are the cons of using Babel?
What are the cons of using Closure Compiler?
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
Babel is awesome! 100% of the code for Cloudcraft.co is transpiled from ES2015 (even some ES7 extensions, like decorators and class properties!), using Gulp+Browserify for the frontend and on-the-fly translation in the Node.js backend. Babel allows us to use all the features of future JS, today, giving us a efficient and clean codebase. Overall, it has been an exceptionally smooth adoption, everything Just Works(tm), including debugging with source maps, etc.
When you are using modern (or sometimes experimental) features of the language, you’ll eventually have to transpile them so that your app works in a wide spectrum of user agents.
Babel is the transpilation tool of my choice.
Babel transpiles ES6/ES2015+ code to a format older browsers (*cough* IE *cough*) can understand. This allows developers to write modern JS code while remaining compatible with older systems.
Babel is used in Kuro (https://github.com/Marc3842h/kuro).
Kuro is the browser facing portion of shiro. We use Babel as a easy to use build system for our frontend stack.