历经 2 年,4k 多次提交,50 多个预发布版本以及大量社区援助,我们很高兴地宣布发布 Babel 7。自 Babel 6 发布以来,已经过了将近三年的时间!发布期间有许多要进行的迁移工作,因此请在发布第一周与我们联系。Babel 7 是更新巨大的版本:我们使它编译更快,并创建了升级工具,支持 JS 配置,支持配置 "overrides",更多 size/minification 的选项,支持 JSX 片段,支持 TypeScript,支持新提案等等!
Removing Babel's Stage Presets
Moving forward with v7, we've decided it's best to stop publishing the Stage presets in Babel (e.g. @babel/preset-stage-0
).
We didn't make this decision lightly and wanted to show the context behind the interplay between TC39, Babel, and the community.
What's Happening With the Pipeline (|>) Proposal?
With the release of babel@7.0.0-beta52, we introduced a new required configuration flag to @babel/plugin-proposal-pipeline-operator
, a breaking change for the pipeline operator. To clear up any confusion, let's take a look at the pipeline proposal and why we needed to introduce this configuration option.
Announcing Babel's New Partnership with trivago!
We are happy to announce a new partnership with trivago, the hotel search website.
On Consuming (and Publishing) ES2015+ Packages
For those of us that need to support older browsers, we run a compiler like Babel over application code. But that's not all of the code that we ship to browsers; there's also the code in our node_modules
.
Can we make compiling our dependencies not just possible, but normal?
Nearing the 7.0 Release
Check out Planning for 7.0 for the last updates throughout the 7.0 pre-releases. If something isn't clear in this post let me know!
Babel Turns Three
Happy Birthday Babel! 🎂 (Sept 28)
Babel has really come a long way since Sebastian started the project only 3 years ago! A while back it was renamed from 6to5 to Babel; for good reason as it has significantly contributed to the use of ES2015+ by many companies, libraries, and developers alike.
Planning for 7.0
If you didn't know already, we're planning on releasing a 7.0 version soon 🙌 ! Work on it actually started back in February, when I just wanted to make a release to drop Node 0.10/0.12 support and remove babel-runtime and various other code. And since then, we've done releases up to alpha.20
.
Zero-config code transformation with babel-plugin-macros
Babel started out as a transpiler to let you write the latest version of the ECMAScript specification but ship to environments that don't implement those features yet. But it has become much more than that. "Compilers are the New Frameworks" says Tom Dale and I could not agree more. We're seeing more and more compile-time optimizations for libraries and frameworks. I'm not talking about syntax extensions to the language, but simple code transformations that enable patterns that would be difficult to accomplish otherwise.
Contributing to Babel: Three Lessons to Remember
Getting to work your way around a new code base always poses its challenges, and Babel was no exception.
I’ve been working with Babel as part of the Google Summer of Code 2017 program, working to update Babel transforms and the Babylon parser to accommodate changes to specifications and implementing new features.
Here’s a few things I’ve learnt from my adventures so far.