UNPKG

2.91 kBMarkdownView Raw
1# Browserslist [![Cult Of Martians][cult-img]][cult]
2
3<img width="120" height="120" alt="Browserslist logo by Anton Popov"
4 src="https://browsersl.ist/logo.svg" align="right">
5
6The config to share target browsers and Node.js versions between different
7front-end tools. It is used in:
8
9* [Autoprefixer]
10* [Babel]
11* [postcss-preset-env]
12* [eslint-plugin-compat]
13* [stylelint-no-unsupported-browser-features]
14* [postcss-normalize]
15* [obsolete-webpack-plugin]
16
17All tools will find target browsers automatically,
18when you add the following to `package.json`:
19
20```json
21 "browserslist": [
22 "defaults and fully supports es6-module",
23 "maintained node versions"
24 ]
25```
26
27Or in `.browserslistrc` config:
28
29```yaml
30# Browsers that we support
31
32defaults and fully supports es6-module
33maintained node versions
34```
35
36Developers set their version lists using queries like `last 2 versions`
37to be free from updating versions manually.
38Browserslist will use [`caniuse-lite`] with [Can I Use] data for this queries.
39
40You can check how config works at our playground: [`browsersl.ist`](https://browsersl.ist/)
41
42<a href="https://browsersl.ist/">
43 <img src="/img/screenshot.webp" alt="browsersl.ist website">
44</a>
45
46<br>
47<br>
48<div align="center">
49 <a href="https://evilmartians.com/?utm_source=browserslist"><img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"></a>  <a href="https://cube.dev/?ref=eco-browserslist-github"><img src="https://user-images.githubusercontent.com/986756/154330861-d79ab8ec-aacb-4af8-9e17-1b28f1eccb01.svg" alt="Supported by Cube" width="227" height="46"></a>
50</div>
51
52[stylelint-no-unsupported-browser-features]: https://github.com/ismay/stylelint-no-unsupported-browser-features
53[obsolete-webpack-plugin]: https://github.com/ElemeFE/obsolete-webpack-plugin
54[eslint-plugin-compat]: https://github.com/amilajack/eslint-plugin-compat
55[Browserslist Example]: https://github.com/browserslist/browserslist-example
56[postcss-preset-env]: https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env
57[postcss-normalize]: https://github.com/csstools/postcss-normalize
58[`browsersl.ist`]: https://browsersl.ist/
59[`caniuse-lite`]: https://github.com/ben-eb/caniuse-lite
60[Autoprefixer]: https://github.com/postcss/autoprefixer
61[Can I Use]: https://caniuse.com/
62[Babel]: https://github.com/babel/babel/tree/master/packages/babel-preset-env
63[cult-img]: https://cultofmartians.com/assets/badges/badge.svg
64[cult]: https://cultofmartians.com/done.html
65
66## Docs
67Read full docs **[here](https://github.com/browserslist/browserslist#readme)**.