今天发布 Babel 8:仅支持 ESM,放弃 ES5 默认,同时提供顺畅的迁移路径
今天我们发布了 Babel 8。距离我们发布 Babel 7 已经有 8 年了。这绝不是没有原因的。
🌐 Today we are releasing Babel 8. It's been 8 years since we released Babel 7. And that's not without reason.
在过去的八年里,JavaScript 生态系统发生了很大变化。除了 Babel,SWC 和 Oxc 也成为了替代的 JavaScript 编译器,而 JavaScript 语言本身也随着新特性和提案的发展而演变(其中很多在标准化之前都曾在 Babel 中进行原型设计和测试!)。
🌐 Over these past 8 years, the JavaScript ecosystem has changed significantly. In addition to Babel, SWC and Oxc have emerged as alternative JavaScript compilers, and the JavaScript language itself has evolved with new features and proposals (many of which were prototyped and tested in Babel before being standardized!).
你可能会想,Babel 因此变得不那么重要了。但现实并非如此。Babel 的下载量从 2018 年每周 170 万次增长到了本周(2026 年 6 月)每周 6.51 亿次。在过去的一年里,Babel 的每周下载量翻了一番。
🌐 You might imagine that Babel became less relevant because of that. But reality begs to differ. Babel has grown from 1.7 million weekly downloads in 2018, to 651 million weekly downloads this week (Jun 2026). Babel has doubled its weekly download counts in the last year.
这种使用方式对我们的用户带来了巨大的责任。Babel 在全球的许多构建管道中都有使用,即使是很小的破坏性更改,也可能导致数十万开发者无法发布他们的代码。这就是为什么我们在过去八年里没有做过带有破坏性更改的重大版本更新,也就是为什么我们对 Babel 8 采取非常谨慎的做法。
🌐 This usage comes with a huge responsibility to our users. Babel is used in so many build pipelines across the world that even minor breaking changes can cause hundreds of thousands of developers to be blocked from shipping their code. That's why we've not done a major release with breaking changes in 8 years, and why we are taking a very careful approach to Babel 8.