Browserslist adds Baseline query support

Browserslist, the browser-targeting utility used by tools like Babel and PostCSS, now supports Baseline queries natively. Previously, developers had to rely on a separate package, browserslist-config-baseline, maintained by the WebDX Community Group (CG), to build a Browserslist config around Baseline. That package is no longer necessary: any toolchain that reads a Browserslist config can now target Baseline directly.

The new query syntax

Browserslist supports three Baseline target options. The queries can be placed anywhere Browserslist config is recognized, such as a .browserslistrc file or package.json.

  • baseline widely available: Targets browsers containing features interoperable for 30 months or more. A specific date can also be used: baseline widely available on 2024-06-06.
  • baseline newly available: Targets browsers with features interoperable for 30 months or less.
  • baseline 2021: Targets the feature set for a specific year, including features available that year and in years past. Supported years range from baseline 2015 to the current year.

None of these targets are defaults in Browserslist; they must be explicitly specified. For guidance on choosing between them, see the article on how to choose your Baseline target.

The integration is the result of collaboration between the Browserslist team and the WebDX CG. Since moving targets like baseline widely available expand over time to include more qualifying features, this native support gives developers a tool that reflects the current web platform landscape automatically.