Babel
  • Docs
  • Setup
  • Try it out
  • Videos
  • Blog
  • Donate
  • Team
  • GitHub

›All Blog Posts

All Blog Posts

  • 7.20.0 Released: Deno target and TypeScript 4.9
  • 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 Released: ESLint 8 and TypeScript 4.5
  • 7.15.0 Released: Hack-style pipelines, TypeScript const enums and Rhino target support
  • 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 Released: Private Instance Methods
  • TC39 Standards Track Decorators in Babel
  • 7.1.0 Released: Decorators, Private Static Fields
  • Babel 7 Released
  • 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 <3 React
  • Not Born to Die
  • 2to3
  • 6to5 + esnext

7.20.0 Released: Deno target and TypeScript 4.9

October 27, 2022

Babel Team

We just published Babel 7.20.0!

This release includes support for TypeScript 4.9, and parser support for the Import Reflection and Explicit Resource Management Stage 2 proposals. Additionally, you can now use Deno as one of your compilation targets.

In the past few releases we have made gradual improvements @babel/generator's code location tracking, which lead to higher source map quality and better positioning of comments in the generated output.

We are also releasing version 9.0.0 of babel-loader, the Babel loader for Webpack.

You can read the whole changelog on GitHub.

If you or your company want to support Babel and the evolution of JavaScript, but aren't sure how, you can donate to us on our Open Collective and, better yet, work with us on the implementation of new ECMAScript proposals directly! As a volunteer-driven project, we rely on the community's support to fund our efforts in supporting the wide range of JavaScript users. Reach out at team@babeljs.io if you'd like to discuss more!

Highlights

TypeScript 4.9 (#14211)

TypeScript 4.9 introduces a new keyword operator, satisfies, that lets you assert that an expression has a given type without actually casting that expression:

let a = { x: 1, y: 2 } as const;
//  ^ type is { x: 1, y: 2 }

let b = a satisfies { [key: string]: number };
//  ^ type is still { x: 1, y: 2 }, and not { [key: string]: number }!

a satisfies { [key: string]: string };
// error! a does not satisfies that type

You can read more about this in the TypeScript 4.9 release post 😉.

Babel can now parse and strip away those annotations when using @babel/plugin-transform-typescript or @babel/preset-typescript, allowing you to start using the new TypeScript version.

Deno compilation target (#14944)

When compiling for Deno, you can configure @babel/preset-env to only compile the features not supported by your Deno version. While Deno usually ships new ECMAScript features as soon as possible, you might need to support older engine versions.

You can enable it using the targets option:

{
    "targets": { "deno": "1.20" },
    "presets": ["@babel/preset-env"]
}

babel-loader 9.0.0

This new major version of babel-loader drops support for Webpack < 5, for Babel < 7.12 and for Node.js < 14.15 LTS.

Loader options cannot be specified using the query parameters: instead of specifying options inline (for example, loader: "babel-loader?presets=@babel/preset-env") you will have to use the options object:

{
    loader: "babel-loader",
    options: {
        presets: ["@babel/preset-env"]
    }
}

You can also use a dedicated Babel configuration file, such as babel.config.json.

If you are not using query parameters to specify Babel options, and if you are on a modern version of Webpack, Babel and Node.js, you should be able to update without changes to your Webpack or Babel configurations.

Recent Posts
  • Highlights
    • TypeScript 4.9 (#14211)
    • Deno compilation target (#14944)
    • babel-loader 9.0.0
Babel
Docs
Learn ES2015
Community
VideosUser ShowcaseStack OverflowSlack ChannelTwitter
More
BlogGitHub OrgGitHub RepoWebsite RepoOld 6.x SiteOld 5.x Site