Babel 中文文档
  • 印记中文
  • 文档
  • 配置
  • 试用
  • 视频
  • 博客
  • 赞助
  • 团队
  • GitHub

›All Blog Posts

All Blog Posts

  • 7.19.0 Released: Stage 3 decorators and more RegExp features!
  • 7.18.0 Released: Destructuring private elements and TypeScript 4.7
  • 7.17.0 Released: RegExp 'v' mode and ... 🥁 decorators!
  • 7.16.0 发布: ESLint 8 和 TypeScript 4.5
  • 7.15.0 发布:支持 Hack-style 管道, TypeScript 枚举常量和 Rhino 目标
  • Babel is used by millions, so why are we running out of money?
  • 7.14.0 Released: New class features enabled by default, TypeScript 4.3, and better CommonJS interop
  • 7.13.0 Released: Records and Tuples, granular compiler assumptions, and top-level targets
  • 7.12.0 Released: TypeScript 4.1, strings as import/export names, and class static blocks
  • 7.11.0 Released: ECMAScript 2021 support in preset-env, TypeScript 4.0 support, printing config and the future of `babel-eslint`
  • The State of babel-eslint
  • 7.10.0 Released: Class Fields in preset-env, '#private in' checks and better React tree-shaking
  • 7.9.0 Released: Smaller preset-env output, Typescript 3.8 support and a new JSX transform
  • 7.8.0 Released: ECMAScript 2020, .mjs configuration files and @babel/cli improvements
  • Babel's Funding Plans
  • 7.7.0 Released: Error recovery and TypeScript 3.7
  • 7.6.0 Released: Private static accessors and V8 intrinsic syntax
  • 7.5.0 Released: dynamic import and F# pipelines
  • The Babel Podcast
  • 7.4.0 Released: core-js 3, static private methods and partial application
  • 7.3.0 Released: Named capturing groups, private instance accessors and smart pipelines
  • 7.2.0 发布:私有实例方法(Private Instance Methods)
  • 在 Babel 中支持 TC39 标准的装饰器
  • 7.1.0 Released: Decorators, Private Static Fields
  • Babel 7 发布
  • Removing Babel's Stage Presets
  • What's Happening With the Pipeline (|>) Proposal?
  • Announcing Babel's New Partnership with trivago!
  • On Consuming (and Publishing) ES2015+ Packages
  • Nearing the 7.0 Release
  • Babel Turns Three
  • Planning for 7.0
  • Zero-config code transformation with babel-plugin-macros
  • Contributing to Babel: Three Lessons to Remember
  • Personal Experiences at Babel #1 — A PR with Unusually High Number of Reviews
  • Babel and Summer of Code 2017
  • Upgrade to Babel 7 (moved)
  • Upgrade to Babel 7 for Tool Authors (WIP)
  • 6.23.0 Released
  • The State of Babel
  • 6.19.0 Released
  • 6.18.0 Released
  • 6.16.0 Released
  • Babili (babel-minify)
  • 6.14.0 Released
  • Babel Doctor
  • Setting up Babel 6
  • 6.0.0 Released
  • React on ES6+
  • Function Bind Syntax
  • 5.0.0 Released
  • Babel 喜爱 React
  • 并非出生而逐渐走向灭亡
  • 2to3
  • 6to5 + esnext

7.1.0 Released: Decorators, Private Static Fields

September 17, 2018

Henry Zhu

There's already another release! 7.1.0 includes support for Stage 2 Decorators and adds support for Stage 3 Private Static Fields as well as some various bug fixes.

If you didn't see earlier, we released 7.0!

Decorators (Stage 2)

https://github.com/babel/babel/pull/7976, by Nicolò

class MyClass {
  @decorator
  method() {}
}

It's been many years in the making, but thanks to the amazing work by Nicolò, this release includes initial support for Stage 2 decorators (via @babel/plugin-proposal-decorators). Shoutout to Peeyush for implementing parser support (and initial transform work) during Google Summer of Code last year and thanks to many members of TC39 including Daniel, Kevin, and Diego for their reviews. Keep in mind that since the proposal is Stage 2, it's still subject to major changes. Since there is a lot of the ecosystem on the previous versions of the proposal, we can attempt a codemod for some simple automated transformations to upgrade code with help from the community.

Please check out our separate blog post for more information regarding some history, changes from the previous proposal, and what's next!

Private Static Fields (Stage 3)

https://github.com/babel/babel/pull/8205, by Bloomberg

class C {
  static #foo = "bar";
}

Thanks to Rob, Robin, Robert, Tim, Kubilay and the team at @Bloomberg for implementing this new feature and Justin for the review! I believe this is the first time we've had a company sponsor implementation work for a proposal and looking forward to more from them! If you want to see proposals improve, move forward, or have implementation experience in the wild then consider sponsoring work on it for Babel in addition to just going to TC39.

Private Class Methods support is WIP!

Better Monorepo Support

https://github.com/babel/babel/pull/8660, by Logan

We're introducing a new option: rootMode for babel.config.js files to better support the various ways monorepos are used. The default just checks root but you can change it to look up directories.

Check the rootMode docs for more information.

Recent Posts
  • Decorators (Stage 2)
  • Private Static Fields (Stage 3)
  • Better Monorepo Support
Babel 中文文档
文档
学习 ES2015
社区
视频用户Stack OverflowSlack 频道Twitter
更多
博客GitHub 组织GitHub 仓库Website 仓库旧版网址 6.x旧版网址 5.x