Paul Krill
Editor at Large

Babel JavaScript compiler goes modular

news
Nov 3, 20152 mins

Performance and API improvements round out a major revision for the ECMAScript 2015-compliant platform

Babel is a popular JavaScript compiler that has been installed nearly eight million times and claims dozens of high-profile customers, from Facebook to Netflix to Spotify to Yahoo. The new 6.0.0 release of Babel modularizes the compiler, giving developers the ability to call on just the functionality they need.

The open source compiler has been completely restructured to be as modular as possible, the Babel blog said. “The primary benefit [of modularization] is that people are able to reuse Babel internals for their own projects,” project contributor James Kyle, a JavaScript engineer at CloudFlare, said in an email. “Only need a parser? There’s a package for that. Just a code generator? There’s a package for that.”

Modularization also splits up the transpiling layer into its own plug-ins and turns them off by default. This removes the opinions from Babel and ensures it’s a general purpose tool, said Kyle, who also noted that “Babel 5 changed the transformation and traversal pipeline dramatically to make way for some major performance improvements that have been implemented in Babel 6.”

Also, the plug-in API has been simplified in version 6.0.0 after Babel project developers received feedback that the plug-in API was confusing. The developers, though, were still working on integrations for Babel 6.0.0 as well as documentation upon its release late last week.

Adherence to the ECMAScript 2015 specification is a key selling point of the project. Through this compliance, developers are ensured that code they write will not be invalidated in the future. “Babel is the most accurate implementation of ES2015 in a compiler today, and while the transpiling portion of Babel cannot possibly conform 100 percent, that’s the exact goal of the parser. We inch closer to 100 percent compliance every day as people open up issues for every edge case imaginable.”

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author