62c61cebb0ca90b0ad8a02f39d2a149d1bb61363317aab3cff8e2b27f162b887081dc297f49dbb1a81bfc21d10f116bfea28c77af33bdcf2b89a64b82649e9 2.8 KB

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