{"id":13452075,"url":"https://github.com/browserslist/browserslist","last_synced_at":"2025-09-09T20:41:26.520Z","repository":{"id":24564135,"uuid":"27971466","full_name":"browserslist/browserslist","owner":"browserslist","description":"🦔 Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env","archived":false,"fork":false,"pushed_at":"2025-05-02T15:46:51.000Z","size":4437,"stargazers_count":13258,"open_issues_count":45,"forks_count":735,"subscribers_count":138,"default_branch":"main","last_synced_at":"2025-05-05T02:08:18.680Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://browsersl.ist","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/browserslist.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"browserslist","tidelift":"npm/browserslist","github":"ai"}},"created_at":"2014-12-13T19:35:45.000Z","updated_at":"2025-05-04T15:02:45.000Z","dependencies_parsed_at":"2023-02-16T07:15:23.065Z","dependency_job_id":"dc473c9c-2014-4a7a-a067-d596721bac27","html_url":"https://github.com/browserslist/browserslist","commit_stats":{"total_commits":1402,"total_committers":188,"mean_commits":7.457446808510638,"dds":"0.18330955777460767","last_synced_commit":"065c69b0e1e6ad679263d03e22c605830bbc52e5"},"previous_names":["ai/browserslist"],"tags_count":195,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserslist%2Fbrowserslist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserslist%2Fbrowserslist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserslist%2Fbrowserslist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserslist%2Fbrowserslist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/browserslist","download_url":"https://codeload.github.com/browserslist/browserslist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252432146,"owners_count":21746999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T07:01:12.033Z","updated_at":"2025-09-09T20:41:26.511Z","avatar_url":"https://github.com/browserslist.png","language":"JavaScript","readme":"# Browserslist\n\n\u003cimg width=\"120\" height=\"120\" alt=\"Browserslist logo by Anton Popov\"\n     src=\"https://browsersl.ist/logo.svg\" align=\"right\"\u003e\n\nThe config to share target browsers and Node.js versions between different\nfront-end tools. It is used in:\n\n* [Autoprefixer]\n* [Babel]\n* [postcss-preset-env]\n* [eslint-plugin-compat]\n* [stylelint-no-unsupported-browser-features]\n* [postcss-normalize]\n* [obsolete-webpack-plugin]\n\nAll tools will find target browsers automatically,\nwhen you add the following to `package.json`:\n\n```json\n  \"browserslist\": [\n    \"defaults and fully supports es6-module\",\n    \"maintained node versions\"\n  ]\n```\n\nOr in `.browserslistrc` config:\n\n```yaml\n# Browsers that we support\n\ndefaults and fully supports es6-module\nmaintained node versions\n```\n\nDevelopers set their version lists using queries like `last 2 versions`\nto be free from updating versions manually.\nBrowserslist will use [`caniuse-lite`] with [Can I Use] data for this queries.\n\nYou can check how config works at our playground: [`browsersl.ist`](https://browsersl.ist/)\n\n\u003ca href=\"https://browsersl.ist/\"\u003e\n  \u003cimg src=\"/img/screenshot.webp\" alt=\"browsersl.ist website\"\u003e\n\u003c/a\u003e\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://evilmartians.com/?utm_source=browserslist\"\u003e\u003cimg src=\"https://evilmartians.com/badges/sponsored-by-evil-martians.svg\" alt=\"Sponsored by Evil Martians\" width=\"236\" height=\"54\"\u003e\u003c/a\u003e  \u003ca href=\"https://cube.dev/?ref=eco-browserslist-github\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/986756/154330861-d79ab8ec-aacb-4af8-9e17-1b28f1eccb01.svg\" alt=\"Supported by Cube\" width=\"227\" height=\"46\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n[stylelint-no-unsupported-browser-features]: https://github.com/ismay/stylelint-no-unsupported-browser-features\n[obsolete-webpack-plugin]:                   https://github.com/ElemeFE/obsolete-webpack-plugin\n[eslint-plugin-compat]:                      https://github.com/amilajack/eslint-plugin-compat\n[Browserslist Example]:                      https://github.com/browserslist/browserslist-example\n[postcss-preset-env]:                        https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env\n[postcss-normalize]:                         https://github.com/csstools/postcss-normalize\n[`browsersl.ist`]:                           https://browsersl.ist/\n[`caniuse-lite`]:                            https://github.com/ben-eb/caniuse-lite\n[Autoprefixer]:                              https://github.com/postcss/autoprefixer\n[Can I Use]:                                 https://caniuse.com/\n[Babel]:                                     https://github.com/babel/babel/tree/master/packages/babel-preset-env\n\n## Table of Contents\n\n* [Tools](#tools)\n* [Best Practices](#best-practices)\n* [Queries](#queries)\n* [Config File](#config-file)\n* [Shareable Configs](#shareable-configs)\n* [Configuring for Different Environments](#configuring-for-different-environments)\n* [Custom Usage Data](#custom-usage-data)\n* [JS API](#js-api)\n* [Environment Variables](#environment-variables)\n* [Cache](#cache)\n* [Security Contact](#security-contact)\n* [For Enterprise](#for-enterprise)\n\n\n## Sponsors\n\nBrowserslist needs your support. We are accepting donations\n[at Open Collective](https://opencollective.com/browserslist).\n\n\u003ca href=\"https://workleap.com/\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/f4f764d3-39ce-4d4e-bdcb-2583ce349812\" alt=\"Sponsored by Workleap\" width=\"154\" height=\"40\"\u003e\u003c/a\u003e      \u003ca href=\"https://kinsta.com/\"\u003e\u003cimg src=\"https://github.com/user-attachments/assets/27cd0c29-637a-4c94-a60c-85c056cbac28\" alt=\"Sponsored by Kinsta\" width=\"158\" height=\"40\"\u003e\u003c/a\u003e\n\n\n## Tools\n\n### Analyze your Browserslist Config\n\n* Run `npx browserslist` in your project directory to see project’s\n  target browsers. This CLI tool is built-in and available in any project\n  with Autoprefixer.\n* [`browserslist-lint`] checks your config for popular mistakes.\n\n\n### Update `caniuse-lite`\n\n* [`update-browserslist-db`] is a CLI tool to update browsers DB for queries\n  like `last 2 version` or `\u003e1%`.\n* [`browserslist-update-action`] is a GitHub Action to automatically\n  run `update-browserslist-db` and proposes a pull request to merge updates.\n\n\n### Useful Shared Configs\n\n* [`browserslist-config-baseline`]\n\n\n### Show “We do not support your browser” Banner\n\n* [`browserslist-useragent-regexp`] compiles Browserslist query to a RegExp\n  to test browser useragent.\n* [`browserslist-useragent-ruby`] is a Ruby library to check browser\n  by user agent string to match Browserslist.\n\n\n### Get Statistics for `\u003e5% in my stats`:\n\n* [`browserslist-ga`] and [`browserslist-ga-export`] download your website\n  browsers statistics to use it in `\u003e 0.5% in my stats` query.\n* [`browserslist-new-relic`] generates a custom usage data file for Browserslist\n* [`browserslist-adobe-analytics`] uses Adobe Analytics data to target browsers\n  from your New Relic Browser data.\n\n\n### Others\n\n* [`browserslist-rs`] is a Browserslist port to Rust.\n* [`browserslist-browserstack`] runs BrowserStack tests for all browsers\n  in Browserslist config.\n\n[`browserslist-useragent-regexp`]: https://github.com/browserslist/browserslist-useragent-regexp\n[`browserslist-adobe-analytics`]:  https://github.com/xeroxinteractive/browserslist-adobe-analytics\n[`browserslist-config-baseline`]: https://github.com/web-platform-dx/browserslist-config-baseline\n[`browserslist-useragent-ruby`]:   https://github.com/browserslist/browserslist-useragent-ruby\n[`browserslist-update-action`]:    https://github.com/c2corg/browserslist-update-action\n[`browserslist-browserstack`]:     https://github.com/xeroxinteractive/browserslist-browserstack\n[`browserslist-ga-export`]:        https://github.com/browserslist/browserslist-ga-export\n[`browserslist-useragent`]:        https://github.com/pastelsky/browserslist-useragent\n[`update-browserslist-db`]:        https://github.com/browserslist/update-db\n[`browserslist-new-relic`]:        https://github.com/syntactic-salt/browserslist-new-relic\n[`browserslist-lint`]:             https://github.com/browserslist/lint/\n[`browserslist-ga`]:               https://github.com/browserslist/browserslist-ga\n[`browserslist-rs`]:               https://github.com/g-plane/browserslist-rs\n[`caniuse-api`]:                   https://github.com/Nyalab/caniuse-api\n\n\n### Text Editors\n\nThese extensions will add syntax highlighting for `.browserslistrc` files.\n\n* [VS Code](https://marketplace.visualstudio.com/items?itemName=webben.browserslist)\n* [Vim](https://github.com/browserslist/vim-browserslist)\n* [WebStorm](https://plugins.jetbrains.com/plugin/16139-browserslist)\n\n## Best Practices\n\n* There is a `defaults` query, which gives a reasonable configuration\n  for most users:\n\n  ```json\n    \"browserslist\": [\n      \"defaults\"\n    ]\n  ```\n\n* If you want to change the default set of browsers, we recommend including\n  `last 2 versions, not dead, \u003e 0.2%`. This is because `last n versions` on its\n  own does not add popular old versions, while only using a percentage of usage\n  numbers above `0.2%` will in the long run make popular browsers even more\n  popular. We might run into a monopoly and stagnation situation, as we had with\n  Internet Explorer 6. Please use this setting with caution.\n* Select browsers directly (`last 2 Chrome versions`) only if you are making\n  a web app for a kiosk with one browser. There are a lot of browsers\n  on the market. If you are making general web app you should respect\n  browsers diversity.\n* Don’t remove browsers just because you don’t know them. Opera Mini has\n  100 million users in Africa and it is more popular in the global market\n  than Microsoft Edge. Chinese QQ Browsers has more market share than Firefox\n  and desktop Safari combined.\n\n\n## Queries\n\nBrowserslist will use browsers and Node.js versions query\nfrom one of these sources:\n\n1. `.browserslistrc` config file in current or parent directories.\n2. `browserslist` key in `package.json` file in current or parent directories.\n3. `browserslist` config file in current or parent directories.\n4. `BROWSERSLIST` environment variable.\n5. If the above methods did not produce a valid result\n   Browserslist will use defaults:\n   `\u003e 0.5%, last 2 versions, Firefox ESR, not dead`.\n\n\n### Query Composition\n\nAn `or` combiner can use the keyword `or` as well as `,`.\n`last 1 version or \u003e 1%` is equal to `last 1 version, \u003e 1%`.\n\n`and` query combinations are also supported to perform an\nintersection of all the previous queries:\n`last 1 version or chrome \u003e 75 and \u003e 1%` will select\n(`browser last version` or `Chrome since 76`) and `more than 1% marketshare`.\n\nThere are 3 different ways to combine queries as depicted below. First you start\nwith a single query and then we combine the queries to get our final list.\n\nObviously you can *not* start with a `not` combiner, since there is no left-hand\nside query to combine it with. The left-hand is always resolved as `and`\ncombiner even if `or` is used (this is an API implementation specificity).\n\n| Query combiner type | Illustration | Example |\n| ------------------- | :----------: | ------- |\n|`or`/`,` combiner \u003cbr\u003e (union) | ![Union of queries](img/union.svg)  | `\u003e .5% or last 2 versions` \u003cbr\u003e `\u003e .5%, last 2 versions` |\n| `and` combiner \u003cbr\u003e (intersection) | ![intersection of queries](img/intersection.svg) | `\u003e .5% and last 2 versions` |\n| `not` combiner \u003cbr\u003e (relative complement) | ![Relative complement of queries](img/complement.svg) | These three are equivalent to one another: \u003cbr\u003e `\u003e .5% and not last 2 versions` \u003cbr\u003e `\u003e .5% or not last 2 versions` \u003cbr\u003e `\u003e .5%, not last 2 versions` |\n\n_A quick way to test your query is to do `npx browserslist '\u003e 0.3%, not dead'`\nin your terminal._\n\n### Full List\n\nYou can specify the browser and Node.js versions by queries (case insensitive):\n\n* `defaults`: Browserslist’s default browsers\n  (`\u003e 0.5%, last 2 versions, Firefox ESR, not dead`).\n* By usage statistics:\n  * `\u003e 5%`: browsers versions selected by global usage statistics.\n  `\u003e=`, `\u003c` and `\u003c=` work too.\n  * `\u003e 5% in US`: uses USA usage statistics.\n    It accepts [two-letter country code].\n  * `\u003e 5% in alt-AS`: uses Asia region usage statistics.\n    List of all region codes can be found at [`caniuse-lite/data/regions`].\n  * `\u003e 5% in my stats`: uses [custom usage data].\n  * `\u003e 5% in browserslist-config-mycompany stats`: uses [custom usage data]\n    from `browserslist-config-mycompany/browserslist-stats.json`.\n  * `cover 99.5%`: most popular browsers that provide coverage.\n  * `cover 99.5% in US`: same as above, with [two-letter country code].\n  * `cover 99.5% in my stats`: uses [custom usage data].\n  * `cover 99.5% in browserslist-config-mycompany stats`: uses [custom usage data] from `browserslist-config-mycompany/browserslist-stats.json`.\n* Last versions:\n  * `last 2 versions`: the last 2 versions for *each* browser.\n  * `last 2 Chrome versions`: the last 2 versions of Chrome browser.\n  * `last 2 major versions` or `last 2 iOS major versions`:\n    all minor/patch releases of last 2 major versions.\n* `dead`: browsers without official support or updates for 24 months.\n  Right now it is `IE 11`, `IE_Mob 11`, `BlackBerry 10`, `BlackBerry 7`,\n  `Samsung 4`, `OperaMobile 12.1` and all versions of `Baidu`.\n* Node.js versions:\n  * `node 10` and `node 10.4`: selects latest Node.js `10.x.x`\n  or `10.4.x` release.\n  * `last 2 node versions`: select 2 latest Node.js releases.\n  * `last 2 node major versions`: select 2 latest major-version Node.js releases.\n  * `current node`: Node.js version used by Browserslist right now.\n  * `maintained node versions`: all Node.js versions, which are [still maintained]\n    by Node.js Foundation.\n* Browsers versions:\n  * `iOS 7`: the iOS browser version 7 directly. Note, that `op_mini`\n    has special version `all`.\n  * `Firefox \u003e 20`: versions of Firefox newer than 20.\n    `\u003e=`, `\u003c` and `\u003c=` work too. It also works with Node.js.\n  * `ie 6-8`: selects an inclusive range of versions.\n  * `Firefox ESR`: the latest [Firefox Extended Support Release].\n  * `PhantomJS 2.1` and `PhantomJS 1.9`: selects Safari versions similar\n    to PhantomJS runtime.\n* `extends browserslist-config-mycompany`: take queries from\n  `browserslist-config-mycompany` npm package.\n* By browser support:\u003cbr\u003e\n  In these example queries `es6` and `es6-module` are the the `feat` parameter\n  from the URL of the [Can I Use] page. A list of all available features can be\n  found at [`caniuse-lite/data/features`].\n  * `fully supports es6`: browsers with full support for specific\n    features. For example, `fully supports css-grid` will omit Edge 12-15, as\n    those browser versions are marked as [having partial support].\n  * `partially supports es6-module` or `supports es6-module`:  browsers with\n    full or partial support for specific features. For example,\n    `partially supports css-grid` will include Edge 12-15 support, as those\n    browser versions are marked as [having partial support].\n* `browserslist config`: the browsers defined in Browserslist config. Useful\n  in Differential Serving to modify user’s config like\n  `browserslist config and fully supports es6-module`.\n* `since 2015` or `last 2 years`: all versions released since year 2015\n  (also `since 2015-03` and `since 2015-03-10`).\n* `unreleased versions` or `unreleased Chrome versions`:\n  alpha and beta versions.\n* `not ie \u003c= 8`: exclude IE 8 and lower from previous queries.\n\nYou can add `not ` to any query.\n\n[`caniuse-lite/data/regions`]: https://github.com/ben-eb/caniuse-lite/tree/main/data/regions\n[`caniuse-lite/data/features`]: https://github.com/ben-eb/caniuse-lite/tree/main/data/features\n[two-letter country code]:     https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements\n[custom usage data]:           #custom-usage-data\n[still maintained]:            https://github.com/nodejs/Release\n[Can I Use]:                   https://caniuse.com/\n[Firefox Extended Support Release]: https://support.mozilla.org/en-US/kb/choosing-firefox-update-channel\n[having partial support]: https://caniuse.com/css-grid\n\n### Grammar Definition\n\nThere is a [grammar specification](./grammar.w3c-ebnf) about the query syntax,\nwhich may be helpful if you're implementing a parser or something else.\n\n### Debug\n\nRun `npx browserslist` in a project directory to see which browsers were selected\nby your queries.\n\n```sh\n$ npx browserslist\nand_chr 61\nand_ff 56\nand_qq 1.2\nand_uc 11.4\nandroid 56\nbaidu 7.12\nbb 10\nchrome 62\nedge 16\nfirefox 56\nios_saf 11\nopera 48\nsafari 11\nsamsung 5\n```\n\n\n### Browsers\n\nThe following table maps browser names \u0026 their target devices into identifiers used by browserslist.\n\n| Browser Name             | Desktop         | Android                   | iOS                      | Other Mobile      |\n| ------------------------ | --------------- | ------------------------- | ------------------------ | ----------------- |\n| Android (WebView)        |                 | `Android`                 |                          |                   |\n| Baidu                    | `Baidu`         |                           |                          |                   |\n| BlackBerry               |                 |                           |                          | `BlackBerry` `bb` |\n| Chrome                   | `Chrome`        | `ChromeAndroid` `and_chr` | ↪︎ `ios_saf`\u003csup\u003e2\u003c/sup\u003e |                   |\n| Edge                     | `Edge`          | ↪︎ `and_chr`              | ↪︎ `ios_saf`\u003csup\u003e2\u003c/sup\u003e |                   |\n| Electron                 | `Electron`      |                           |                          |                   |\n| Firefox                  | `Firefox` `ff`  | `FirefoxAndroid` `and_ff` | ↪︎ `ios_saf`\u003csup\u003e2\u003c/sup\u003e |                   |\n| Internet Explorer        | `Explorer` `ie` |                           |                          | `ie_mob`          |\n| Node.js                  | `Node`          |                           |                          |                   |\n| [KaiOS Browser]          |                 |                           |                          | `kaios`           |\n| Opera                    | `Opera`         | `op_mob` \u003csup\u003e1\u003c/sup\u003e     | ↪︎ `ios_saf`\u003csup\u003e2\u003c/sup\u003e |                   |\n| [Opera Mini]\u003csup\u003e3\u003c/sup\u003e |                 | `OperaMini` `op_mini`     |                          |                   |\n| [QQ browser]             |                 | `and_qq`                  |                          |                   |\n| Safari                   | `Safari`        |                           | `iOS` `ios_saf`          |                   |\n| Samsung Internet         |                 | `Samsung`                 |                          |                   |\n| [UC Browser]             |                 | `UCAndroid` `and_uc`      |                          |                   |\n\n- `↪︎ name` implies that the browser uses the same engine captured by `name`\n- \u003csup\u003e1\u003c/sup\u003e [Opera Mobile ≈ Chrome Android](https://github.com/Fyrd/caniuse/issues/5602#issuecomment-792385127)\n- \u003csup\u003e2\u003c/sup\u003e [All iOS browsers use WebKit](https://en.wikipedia.org/wiki/WebKit)\n- \u003csup\u003e3\u003c/sup\u003e Opera Mini has 2 modes “Extreme” and “High” for data saving.\n  `op_mini` targets at the “Extreme” one.\n  “High” is compatible with the normal Opera Mobile.\n\n[KaiOS Browser]: https://medium.com/design-at-kai/what-you-didnt-know-about-kaios-browser-53937ea1636\n[QQ browser]: https://en.wikipedia.org/wiki/QQ_browser\n[Opera Mini]: https://en.wikipedia.org/wiki/Opera_Mini\n[UC Browser]: https://en.wikipedia.org/wiki/UC_Browser\n\n## Config File\n\n### `package.json`\n\nIf you want to reduce config files in project root, you can specify\nbrowsers in `package.json` with `browserslist` key:\n\n```json\n{\n  \"private\": true,\n  \"dependencies\": {\n    \"autoprefixer\": \"^6.5.4\"\n  },\n  \"browserslist\": [\n    \"last 1 version\",\n    \"\u003e 1%\",\n    \"not dead\"\n  ]\n}\n```\n\n\n### `.browserslistrc`\n\nSeparated Browserslist config should be named `.browserslistrc`\nand have browsers queries split by a new line.\nEach line is combined with the `or` combiner. Comments starts with `#` symbol:\n\n```yaml\n# Browsers that we support\n\nlast 1 version\n\u003e 1%\nnot dead # no browsers without security updates\n```\n\nBrowserslist will check config in every directory in `path`.\nSo, if tool process `app/styles/main.css`, you can put config to root,\n`app/` or `app/styles`.\n\nYou can specify direct path in `BROWSERSLIST_CONFIG` environment variables.\n\n\n## Shareable Configs\n\nYou can use the following query to reference an exported Browserslist config\nfrom another package:\n\n```json\n  \"browserslist\": [\n    \"extends browserslist-config-mycompany\"\n  ]\n```\n\nFor security reasons, external configuration only supports packages that have\nthe `browserslist-config-` prefix. npm scoped packages are also supported, by\nnaming or prefixing the module with `@scope/browserslist-config`, such as\n`@scope/browserslist-config` or `@scope/browserslist-config-mycompany`.\n\nIf you don’t accept Browserslist queries from users, you can disable the\nvalidation by using the or `BROWSERSLIST_DANGEROUS_EXTEND` environment variable.\n\n```sh\nBROWSERSLIST_DANGEROUS_EXTEND=1 npx webpack\n```\n\nBecause this uses `npm`'s resolution, you can also reference specific files\nin a package:\n\n```json\n  \"browserslist\": [\n    \"extends browserslist-config-mycompany/desktop\",\n    \"extends browserslist-config-mycompany/mobile\"\n  ]\n```\n\nWhen writing a shared Browserslist package, just export an array.\n`browserslist-config-mycompany/index.js`:\n\n```js\nmodule.exports = [\n  'last 1 version',\n  '\u003e 1%',\n  'not dead'\n]\n```\n\nYou can also include a `browserslist-stats.json` file as part of your shareable\nconfig at the root and query it using\n`\u003e 5% in browserslist-config-mycompany stats`. It uses the same format\nas `extends` and the `dangerousExtend` property as above.\n\nYou can export configs for different environments and select environment\nby `BROWSERSLIST_ENV` or `env` option in your tool:\n\n```js\nmodule.exports = {\n  development: [\n    'last 1 version'\n  ],\n  production: [\n    'last 1 version',\n    '\u003e 1%',\n    'not dead'\n  ]\n}\n```\n\n\n### Popular Configs\n\nYou can use a third-party Browserslist config instead of writing your own:\n\n* [`browserslist-config-baseline`] supports features that are\n  [“widely available” on MDN].\n* [`@wordpress/browserslist-config`] supports the same browsers WordPress does.\n  For instance, useful for WordPress plugins development.\n* All configs can be found by [`browserslist-config` on npm].\n\n[“widely available” on MDN]: https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility\n[`browserslist-config-baseline`]: https://www.npmjs.com/package/browserslist-config-baseline\n[`@wordpress/browserslist-config`]: https://www.npmjs.com/package/@wordpress/browserslist-config\n[`browserslist-config` on npm]: https://www.npmjs.com/search?q=browserslist-config\n\n\n## Configuring for Different Environments\n\nYou can also specify different browser queries for various environments.\nBrowserslist will choose query according to `BROWSERSLIST_ENV` or `NODE_ENV`\nvariables. If none of them is declared, Browserslist will firstly look\nfor `production` queries and then use defaults.\n\nIn `package.json`:\n\n```js\n  \"browserslist\": {\n    \"production\": [\n      \"\u003e 1%\",\n      \"not dead\"\n    ],\n    \"modern\": [\n      \"last 1 chrome version\",\n      \"last 1 firefox version\"\n    ],\n    \"ssr\": [\n      \"node 12\"\n    ]\n  }\n```\n\nIn `.browserslistrc` config:\n\n```ini\n[production]\n\u003e 1%\nnot dead\n\n[modern]\nlast 1 chrome version\nlast 1 firefox version\n\n[ssr]\nnode 12\n```\n\n\n## Custom Usage Data\n\nIf you have a website, you can query against the usage statistics of your site.\n[`browserslist-ga`] will ask access to Google Analytics and then generate\n`browserslist-stats.json`:\n\n```\nnpx browserslist-ga\n```\n\nOr you can use [`browserslist-ga-export`] to convert Google Analytics data without giving a password for Google account.\n\nYou can generate usage statistics file by any other method. File format should\nbe like:\n\n```js\n{\n  \"ie\": {\n    \"6\": 0.01,\n    \"7\": 0.4,\n    \"8\": 1.5\n  },\n  \"chrome\": {\n    …\n  },\n  …\n}\n```\n\nNote that you can query against your custom usage data while also querying\nagainst global or regional data. For example, the query\n`\u003e 1% in my stats, \u003e 5% in US, 10%` is permitted.\n\n[`browserslist-ga-export`]: https://github.com/browserslist/browserslist-ga-export\n[`browserslist-ga`]:        https://github.com/browserslist/browserslist-ga\n[Can I Use]:                https://caniuse.com/\n\n\n## JS API\n\n```js\nconst browserslist = require('browserslist')\n\n// Your CSS/JS build tool code\nfunction process (source, opts) {\n  const browsers = browserslist(opts.overrideBrowserslist, {\n    stats: opts.stats,\n    path:  opts.file,\n    env:   opts.env\n  })\n  // Your code to add features for selected browsers\n}\n```\n\nQueries can be a string `\"\u003e 1%, not dead\"`\nor an array `['\u003e 1%', 'not dead']`.\n\nIf a query is missing, Browserslist will look for a config file.\nYou can provide a `path` option (that can be a file) to find the config file\nrelatively to it.\n\nOptions:\n\n* `path`: file or a directory path to look for config file. Default is `.`.\n* `env`: what environment section use from config. Default is `production`.\n* `stats`: custom usage statistics data.\n* `config`: path to config if you want to set it manually.\n* `ignoreUnknownVersions`: do not throw on direct query (like `ie 12`).\n  Default is `false`.\n* `dangerousExtend`: Disable security checks for `extend` query.\n  Default is `false`.\n* `throwOnMissing`: throw an error if env is not found.\n  Default is `false`.\n* `mobileToDesktop`: Use desktop browsers if Can I Use doesn’t have data\n  about this mobile version. Can I Use has only data about\n  latest versions of mobile browsers. By default, `last 2 and_ff versions`\n  returns `and_ff 90` and with this option it returns `and_ff 91, and_ff 90`.\n  This option may lead to unknown browser version error (in example Can I Use\n  doesn’t have data for `and_ff 91` yet). Default is `false`.\n\nFor non-JS environment and debug purpose you can use CLI tool:\n\n```sh\nbrowserslist \"\u003e 1%, not dead\"\n```\n\nYou can get total users coverage for selected browsers by JS API:\n\n```js\nbrowserslist.coverage(browserslist('\u003e 1%'))\n//=\u003e 81.4\n```\n\n```js\nbrowserslist.coverage(browserslist('\u003e 1% in US'), 'US')\n//=\u003e 83.1\n```\n\n```js\nbrowserslist.coverage(browserslist('\u003e 1% in my stats'), 'my stats')\n//=\u003e 83.1\n```\n\n```js\nbrowserslist.coverage(browserslist('\u003e 1% in my stats', { stats }), stats)\n//=\u003e 82.2\n```\n\nOr by CLI:\n\n```sh\n$ browserslist --coverage \"\u003e 1%\"\nThese browsers account for 81.4% of all users globally\n```\n\n```sh\n$ browserslist --coverage=US \"\u003e 1% in US\"\nThese browsers account for 83.1% of all users in the US\n```\n\n```sh\n$ browserslist --coverage \"\u003e 1% in my stats\"\nThese browsers account for 83.1% of all users in custom statistics\n```\n\n```sh\n$ browserslist --coverage \"\u003e 1% in my stats\" --stats=./stats.json\nThese browsers account for 83.1% of all users in custom statistics\n```\n\n\n## Environment Variables\n\nIf a tool uses Browserslist inside, you can change the Browserslist settings\nwith [environment variables]:\n\n* `BROWSERSLIST` with browsers queries.\n\n   ```sh\n  BROWSERSLIST=\"\u003e 5%\" npx webpack\n   ```\n\n* `BROWSERSLIST_CONFIG` with path to config file.\n\n   ```sh\n  BROWSERSLIST_CONFIG=./config/browserslist npx webpack\n   ```\n\n* `BROWSERSLIST_ENV` with environments string.\n\n   ```sh\n  BROWSERSLIST_ENV=\"development\" npx webpack\n   ```\n\n* `BROWSERSLIST_STATS` with path to the custom usage data\n  for `\u003e 1% in my stats` query.\n\n   ```sh\n  BROWSERSLIST_STATS=./config/usage_data.json npx webpack\n   ```\n\n* `BROWSERSLIST_DISABLE_CACHE` if you want to disable config reading cache.\n\n   ```sh\n  BROWSERSLIST_DISABLE_CACHE=1 npx webpack\n   ```\n\n* `BROWSERSLIST_DANGEROUS_EXTEND` to disable security shareable config\n  name check.\n\n   ```sh\n  BROWSERSLIST_DANGEROUS_EXTEND=1 npx webpack\n   ```\n\n* `BROWSERSLIST_ROOT_PATH` to prevent reading files above this path.\n\n   ```sh\n  BROWSERSLIST_ROOT_PATH=. npx webpack\n   ```\n\n[environment variables]: https://en.wikipedia.org/wiki/Environment_variable\n\n### `browserslist.coverage()`\n\nReturn browsers market coverage.\n\n```js\nconst browsers = browserslist('\u003e 1% in US')\nbrowserslist.coverage(browsers, 'US') //=\u003e 83.1\n```\n\n### `browserslist.loadConfig()`\n\nIt is like calling `browserslist()`, but it returns config’s queries,\nnot browsers.\n\n```js\nbrowserslist.loadConfig({ path: process.cwd() }) ?? browserslist.defaults\n```\n\n### `browserslist.defaults`\n\nAn array with default queries.\n\n\n## Cache\n\nBrowserslist caches the configuration it reads from `package.json` and\n`browserslist` files, as well as knowledge about the existence of files,\nfor the duration of the hosting process.\n\nTo clear these caches, use:\n\n```js\nbrowserslist.clearCaches()\n```\n\nTo disable the caching altogether, set the `BROWSERSLIST_DISABLE_CACHE`\nenvironment variable.\n\n\n## Security Contact\n\nTo report a security vulnerability, please use the [Tidelift security contact].\nTidelift will coordinate the fix and disclosure.\n\n[Tidelift security contact]: https://tidelift.com/security\n\n\n## For Enterprise\n\nAvailable as part of the Tidelift Subscription.\n\nThe maintainers of `browserslist` and thousands of other packages are working\nwith Tidelift to deliver commercial support and maintenance for the open source\ndependencies you use to build your applications. Save time, reduce risk,\nand improve code health, while paying the maintainers of the exact dependencies\nyou use. [Learn more.](https://tidelift.com/subscription/pkg/npm-browserslist?utm_source=npm-browserslist\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo)\n\n\n## Browsers Data Updating\n\nSee [`update-browserslist-db` docs](https://github.com/browserslist/update-db#readme)\n","funding_links":["https://opencollective.com/browserslist","https://tidelift.com/funding/github/npm/browserslist","https://github.com/sponsors/ai","https://tidelift.com/security","https://tidelift.com/subscription/pkg/npm-browserslist?utm_source=npm-browserslist\u0026utm_medium=referral\u0026utm_campaign=enterprise\u0026utm_term=repo"],"categories":["JavaScript","\u003e 3k ★","Веб-разработка","Post-Processing CSS","TypeScript","Development Tools"],"sub_categories":["Result"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserslist%2Fbrowserslist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrowserslist%2Fbrowserslist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserslist%2Fbrowserslist/lists"}