Browserslist

Browserslist logo

Browserslist enables the sharing of target browser and Node.js versions configuration between various frontend tools. It is used in Autoprefixer, Babel, postcss-preset-env, eslint-plugin-compat, stylelint-no-unsupported-browser-features, postcss-normalize, obsolete-webpack-plugin.

All frontend tools will target browser versions automatically when you add the following to your package.json:

  "browserslist": [
    "defaults and supports es6-module",
    "maintained node versions"
  ]

Or in your .browserslistrc config:

# Browsers that we support

defaults and supports es6-module
maintained node versions

Developers can set their version lists using queries like last 2 versions to be free from updating versions manually. Browserslist will use caniuse-lite with Can I Use data for those queries.

Browserslist will take queries from tool options, browserslist config, .browserslistrc config,browserslist section in package.json, or environment variables.

Author

Further reading

In the same orbit

Explore more OSS projects

Contact us

We’d love to hear from you! We’re not really all that evil, and we love discussing potential projects, intriguing ideas, and new opportunities. Complete the form below or drop us a line at surrender@evilmartians.com.

Martians at a glance
16
years in business

A product development consultancy that works with startups and established businesses, while also creating open source-based products and services