[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-3386":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":21,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},3386,"browserslist","browserslist\u002Fbrowserslist","🦔 Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env","https:\u002F\u002Fbrowsersl.ist",null,"JavaScript",13541,766,134,43,0,19,70.55,"MIT License",false,"main",true,[],"2026-06-12 04:00:17","# Browserslist\n\n\u003Cimg width=\"120\" height=\"120\" alt=\"Browserslist logo by Anton Popov\"\n     src=\"https:\u002F\u002Fbrowsersl.ist\u002Flogo.svg\" align=\"right\">\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:\u002F\u002Fbrowsersl.ist\u002F)\n\n\u003Ca href=\"https:\u002F\u002Fbrowsersl.ist\u002F\">\n  \u003Cimg src=\"\u002Fimg\u002Fscreenshot.webp\" alt=\"browsersl.ist website\">\n\u003C\u002Fa>\n\n\u003Cbr>\n\u003Cbr>\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fevilmartians.com\u002F?utm_source=browserslist\">\u003Cimg src=\"https:\u002F\u002Fevilmartians.com\u002Fbadges\u002Fsponsored-by-evil-martians.svg\" alt=\"Sponsored by Evil Martians\" width=\"236\" height=\"54\">\u003C\u002Fa>  \u003Ca href=\"https:\u002F\u002Fcube.dev\u002F?ref=eco-browserslist-github\">\u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F986756\u002F154330861-d79ab8ec-aacb-4af8-9e17-1b28f1eccb01.svg\" alt=\"Supported by Cube\" width=\"227\" height=\"46\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n[stylelint-no-unsupported-browser-features]: https:\u002F\u002Fgithub.com\u002Fismay\u002Fstylelint-no-unsupported-browser-features\n[obsolete-webpack-plugin]: https:\u002F\u002Fgithub.com\u002FElemeFE\u002Fobsolete-webpack-plugin\n[eslint-plugin-compat]: https:\u002F\u002Fgithub.com\u002Familajack\u002Feslint-plugin-compat\n[postcss-preset-env]: https:\u002F\u002Fgithub.com\u002Fcsstools\u002Fpostcss-plugins\u002Ftree\u002Fmain\u002Fplugin-packs\u002Fpostcss-preset-env\n[postcss-normalize]: https:\u002F\u002Fgithub.com\u002Fcsstools\u002Fpostcss-normalize\n[`browsersl.ist`]: https:\u002F\u002Fbrowsersl.ist\u002F\n[`caniuse-lite`]: https:\u002F\u002Fgithub.com\u002Fben-eb\u002Fcaniuse-lite\n[Autoprefixer]: https:\u002F\u002Fgithub.com\u002Fpostcss\u002Fautoprefixer\n[Can I Use]: https:\u002F\u002Fcaniuse.com\u002F\n[Babel]: https:\u002F\u002Fgithub.com\u002Fbabel\u002Fbabel\u002Ftree\u002Fmaster\u002Fpackages\u002Fbabel-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## Sponsors\n\nBrowserslist needs your support. We are accepting donations\n[at Open Collective](https:\u002F\u002Fopencollective.com\u002Fbrowserslist).\n\n\u003Ca href=\"https:\u002F\u002Fworkleap.com\u002F\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ff4f764d3-39ce-4d4e-bdcb-2583ce349812\" alt=\"Sponsored by Workleap\" width=\"154\" height=\"40\">\u003C\u002Fa>      \u003Ca href=\"https:\u002F\u002Fkinsta.com\u002F\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F27cd0c29-637a-4c94-a60c-85c056cbac28\" alt=\"Sponsored by Kinsta\" width=\"158\" height=\"40\">\u003C\u002Fa>\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### Update `caniuse-lite`\n\n- [`update-browserslist-db`] is a CLI tool to update browsers DB for queries\n  like `last 2 version` or `>1%`.\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### Get Statistics for `>5% in my stats`:\n\n- [`browserslist-plausible`] downloads your website\n  browsers statistics from Plausible to use it in `> 0.5% in my stats` query.\n- [`browserslist-ga`] and [`browserslist-ga-export`] download website\n  browsers statistics from Google Analytics.\n- [`browserslist-new-relic`] generates a custom usage data file for Browserslist\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### Others\n\n- [`browserslist-rs`] is a Browserslist port to Rust.\n\n[`browserslist-useragent-regexp`]: https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Fbrowserslist-useragent-regexp\n[`browserslist-useragent-ruby`]: https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Fbrowserslist-useragent-ruby\n[`browserslist-update-action`]: https:\u002F\u002Fgithub.com\u002Fc2corg\u002Fbrowserslist-update-action\n[`browserslist-ga-export`]: https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Fbrowserslist-ga-export\n[`browserslist-useragent`]: https:\u002F\u002Fgithub.com\u002Fpastelsky\u002Fbrowserslist-useragent\n[`update-browserslist-db`]: https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Fupdate-db\n[`browserslist-plausible`]: https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Fbrowserslist-plausible\n[`browserslist-new-relic`]: https:\u002F\u002Fgithub.com\u002Fsyntactic-salt\u002Fbrowserslist-new-relic\n[`browserslist-lint`]: https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Flint\u002F\n[`browserslist-ga`]: https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Fbrowserslist-ga\n[`browserslist-rs`]: https:\u002F\u002Fgithub.com\u002Fg-plane\u002Fbrowserslist-rs\n[`caniuse-api`]: https:\u002F\u002Fgithub.com\u002FNyalab\u002Fcaniuse-api\n\n### Text Editors\n\nThese extensions will add syntax highlighting for `.browserslistrc` files.\n\n- [VS Code](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=webben.browserslist)\n- [Vim](https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Fvim-browserslist)\n- [WebStorm](https:\u002F\u002Fplugins.jetbrains.com\u002Fplugin\u002F16139-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, > 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## 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   `> 0.5%, last 2 versions, Firefox ESR, not dead`.\n\n### Query Composition\n\nAn `or` combiner can use the keyword `or` as well as `,`.\n`last 1 version or > 1%` is equal to `last 1 version, > 1%`.\n\n`and` query combinations are also supported to perform an\nintersection of all the previous queries:\n`last 1 version or chrome > 75 and > 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`\u002F`,` combiner \u003Cbr> (union)            |          ![Union of queries](img\u002Funion.svg)           | `> .5% or last 2 versions` \u003Cbr> `> .5%, last 2 versions`                                                                                              |\n| `and` combiner \u003Cbr> (intersection)        |   ![intersection of queries](img\u002Fintersection.svg)    | `> .5% and last 2 versions`                                                                                                                           |\n| `not` combiner \u003Cbr> (relative complement) | ![Relative complement of queries](img\u002Fcomplement.svg) | These three are equivalent to one another: \u003Cbr> `> .5% and not last 2 versions` \u003Cbr> `> .5% or not last 2 versions` \u003Cbr> `> .5%, not last 2 versions` |\n\n_A quick way to test your query is to do `npx browserslist '> 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  (`> 0.5%, last 2 versions, Firefox ESR, not dead`).\n- By usage statistics:\n  - `> 5%`: browsers versions selected by global usage statistics.\n    `>=`, `\u003C` and `\u003C=` work too.\n  - `> 5% in US`: uses USA usage statistics.\n    It accepts [two-letter country code].\n  - `> 5% in alt-AS`: uses Asia region usage statistics.\n    List of all region codes can be found at [`caniuse-lite\u002Fdata\u002Fregions`].\n  - `> 5% in my stats`: uses [custom usage data].\n  - `> 5% in browserslist-config-mycompany stats`: uses [custom usage data]\n    from `browserslist-config-mycompany\u002Fbrowserslist-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\u002Fbrowserslist-stats.json`.\n- By [Baseline](https:\u002F\u002Fweb-platform-dx.github.io\u002Fweb-features):\n  - `baseline widely available`: browser versions that support all [Baseline Widely available](https:\u002F\u002Fwebstatus.dev\u002F?q=baseline_status%3Awidely) features which have been interoperable in the Baseline core browser set for at least 30 months.\n  - `baseline newly available`: browser versions that support all [Baseline Newly available](https:\u002F\u002Fwebstatus.dev\u002F?q=baseline_status%3Anewly) features which are interoperable in the Baseline core browser set today.\n  - `baseline widely available on YYYY-MM-DD`: selects browser versions that supported the Widely available feature set on the specified date.\n  - `baseline 2022`: selects browser versions that are compatible with all features that were Baseline Newly available at the end of the specified year.\n  - `… with downstream`: includes browsers outside the core browser set that support the requested Baseline feature set based on their Chromium or Gecko version. See [`baseline-browser-mapping`](https:\u002F\u002Fgithub.com\u002Fweb-platform-dx\u002Fbaseline-browser-mapping#downstream-browsers).\n  - `… with downstream including kaios`: same output as the previous query plus KaiOS.\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\u002Fpatch 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 the Node.js team.\n- Browsers versions:\n  - `iOS 7`: the iOS browser version 7 directly. Note, that `op_mini`\n    has special version `all`.\n  - `Firefox > 20`: versions of Firefox newer than 20.\n    `>=`, `\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>\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\u002Fdata\u002Ffeatures`].\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\u002Fdata\u002Fregions`]: https:\u002F\u002Fgithub.com\u002Fben-eb\u002Fcaniuse-lite\u002Ftree\u002Fmain\u002Fdata\u002Fregions\n[`caniuse-lite\u002Fdata\u002Ffeatures`]: https:\u002F\u002Fgithub.com\u002Fben-eb\u002Fcaniuse-lite\u002Ftree\u002Fmain\u002Fdata\u002Ffeatures\n[two-letter country code]: https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FISO_3166-1_alpha-2#Officially_assigned_code_elements\n[custom usage data]: #custom-usage-data\n[still maintained]: https:\u002F\u002Fgithub.com\u002Fnodejs\u002FRelease\n[Can I Use]: https:\u002F\u002Fcaniuse.com\u002F\n[Firefox Extended Support Release]: https:\u002F\u002Fsupport.mozilla.org\u002Fen-US\u002Fkb\u002Fchoosing-firefox-update-channel\n[having partial support]: https:\u002F\u002Fcaniuse.com\u002Fcss-grid\n\n### Grammar Definition\n\nThere is a [grammar specification](.\u002Fgrammar.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### Browsers\n\nThe following table maps browser names & 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>2\u003C\u002Fsup> |                   |\n| Edge                     | `Edge`          | ↪︎ `and_chr`               | ↪︎ `ios_saf`\u003Csup>2\u003C\u002Fsup> |                   |\n| Electron                 | `Electron`      |                           |                         |                   |\n| Firefox                  | `Firefox` `ff`  | `FirefoxAndroid` `and_ff` | ↪︎ `ios_saf`\u003Csup>2\u003C\u002Fsup> |                   |\n| Internet Explorer        | `Explorer` `ie` |                           |                         | `ie_mob`          |\n| Node.js                  | `Node`          |                           |                         |                   |\n| [KaiOS Browser]          |                 |                           |                         | `kaios`           |\n| Opera                    | `Opera`         | `op_mob` \u003Csup>1\u003C\u002Fsup>     | ↪︎ `ios_saf`\u003Csup>2\u003C\u002Fsup> |                   |\n| [Opera Mini]\u003Csup>3\u003C\u002Fsup> |                 | `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>1\u003C\u002Fsup> [Opera Mobile ≈ Chrome Android](https:\u002F\u002Fgithub.com\u002FFyrd\u002Fcaniuse\u002Fissues\u002F5602#issuecomment-792385127)\n- \u003Csup>2\u003C\u002Fsup> [All iOS browsers use WebKit](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FWebKit)\n- \u003Csup>3\u003C\u002Fsup> 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:\u002F\u002Fmedium.com\u002Fdesign-at-kai\u002Fwhat-you-didnt-know-about-kaios-browser-53937ea1636\n[QQ browser]: https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FQQ_browser\n[Opera Mini]: https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FOpera_Mini\n[UC Browser]: https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FUC_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\": [\"last 1 version\", \"> 1%\", \"not dead\"]\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> 1%\nnot dead # no browsers without security updates\n```\n\nBrowserslist will check config in every directory in `path`.\nSo, if tool process `app\u002Fstyles\u002Fmain.css`, you can put config to root,\n`app\u002F` or `app\u002Fstyles`.\n\nYou can specify direct path in `BROWSERSLIST_CONFIG` environment variables.\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\u002Fbrowserslist-config`, such as\n`@scope\u002Fbrowserslist-config` or `@scope\u002Fbrowserslist-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 vite build\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\u002Fdesktop\",\n    \"extends browserslist-config-mycompany\u002Fmobile\"\n  ]\n```\n\nWhen writing a shared Browserslist package, just export an array.\n`browserslist-config-mycompany\u002Findex.js`:\n\n```js\nmodule.exports = ['last 1 version', '> 1%', 'not dead']\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`> 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: ['last 1 version'],\n  production: ['last 1 version', '> 1%', 'not dead']\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\u002Fbrowserslist-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:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FGlossary\u002FBaseline\u002FCompatibility\n[`browserslist-config-baseline`]: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fbrowserslist-config-baseline\n[`@wordpress\u002Fbrowserslist-config`]: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@wordpress\u002Fbrowserslist-config\n[`browserslist-config` on npm]: https:\u002F\u002Fwww.npmjs.com\u002Fsearch?q=browserslist-config\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      \"> 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> 1%\nnot dead\n\n[modern]\nlast 1 chrome version\nlast 1 firefox version\n\n[ssr]\nnode 12\n```\n\n## Custom Usage Data\n\nYou can query against statistics derived from your real-world traffic rather than global marketshare, or use both together. For example, the query `> 1% in my stats, > 5% in US, > 10%` is valid.\n\nTo do this, you'll first need to connect your analytics to Browserslist.\n\n### Plausible Analytics\n\n[`browserslist-plausible`] will query your statistics from [Plausible](https:\u002F\u002Fplausible.io) and generate a `browserslist-stats.json` file.\n\n```sh\nnpx browserslist-plausible --host https:\u002F\u002Fplausible.example.org example.org\n```\n\n### Google Analytics\n\n[`browserslist-ga`] will query your statistics from Google Analytics. Alternatively, you can use [`browserslist-ga-export`] to convert Google Analytics data without being prompted to login with Google.\n\n### \u003Cabbr title=\"Do It Yourself\">DIY\u003C\u002Fabbr> Statistics\n\nYou can also create your statistics file yourself—just be sure to adhere to the statistics schema.\n\n```jsonc\n{\n  \u002F\u002F Browser name\n  \"firefox\": {\n    \u002F\u002F Browser version\n    \"144\": 4.3, \u002F\u002F % of traffic for this browser\u002Fversion combination\n    \"140\": 0.2\n  }\n}\n```\n\n\u003Cdetails>\n\n\u003Csummary>The JavaScript API also exposes a type for code completion and type safety.\u003C\u002Fsummary>\n\n```js\n\u002F** @type {import('browserslist').Stats} *\u002F\nconst browserslistStats = {\n  \u002F\u002F Browser name\n  firefox: {\n    \u002F\u002F Browser version\n    144: 4.3, \u002F\u002F % of traffic for this browser\u002Fversion combination\n    140: 0.2\n  }\n}\n```\n\n\u003C\u002Fdetails>\n\nThe excerpts above show that Firefox 144 made up 4.3% of traffic for the website. The query, `Firefox >= 140`, would have a coverage of `4.5%`.\n\nEach browser name and version must be present in the Can I Use database. Entries that are not present are ignored. To ensure traffic is mapped correctly, it's recommended to refer to [`caniuse-lite`] while converting your data.\n\nThese distinctions are important—traffic like `Google Chrome` (browser) or `140.0` (version) would be ignored, these must match Can I use, so they're `chrome` and `140` in this case.\n\nIt's acceptable for the sum of all percentages to be less than 100%. Not all browser and version combinations are present in Can I Use, and many third-party tools round percentages, so an obscure browser that makes up 0.04% of your traffic may be reported as 0.0%.\n\n[`browserslist-plausible`]: https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Fbrowserslist-plausible\n[`browserslist-ga-export`]: https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Fbrowserslist-ga-export\n[`browserslist-ga`]: https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Fbrowserslist-ga\n[Can I Use]: https:\u002F\u002Fcaniuse.com\u002F\n\n## JS API\n\n```js\nconst browserslist = require('browserslist')\n\n\u002F\u002F Your CSS\u002FJS 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  \u002F\u002F Your code to add features for selected browsers\n}\n```\n\nQueries can be a string `\"> 1%, not dead\"`\nor an array `['> 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 \"> 1%, not dead\"\n```\n\nYou can get total users coverage for selected browsers by JS API:\n\n```js\nbrowserslist.coverage(browserslist('> 1%'))\n\u002F\u002F=> 81.4\n```\n\n```js\nbrowserslist.coverage(browserslist('> 1% in US'), 'US')\n\u002F\u002F=> 83.1\n```\n\n```js\nbrowserslist.coverage(browserslist('> 1% in my stats'), 'my stats')\n\u002F\u002F=> 83.1\n```\n\n```js\nbrowserslist.coverage(browserslist('> 1% in my stats', { stats }), stats)\n\u002F\u002F=> 82.2\n```\n\nOr by CLI:\n\n```sh\n$ browserslist --coverage \"> 1%\"\nThese browsers account for 81.4% of all users globally\n```\n\n```sh\n$ browserslist --coverage=US \"> 1% in US\"\nThese browsers account for 83.1% of all users in the US\n```\n\n```sh\n$ browserslist --coverage \"> 1% in my stats\"\nThese browsers account for 83.1% of all users in custom statistics\n```\n\n```sh\n$ browserslist --coverage \"> 1% in my stats\" --stats=.\u002Fstats.json\nThese browsers account for 83.1% of all users in custom statistics\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=\"> 5%\" npx vite build\n  ```\n\n- `BROWSERSLIST_CONFIG` with path to config file.\n\n  ```sh\n  BROWSERSLIST_CONFIG=.\u002Fconfig\u002Fbrowserslist npx vite build\n  ```\n\n- `BROWSERSLIST_ENV` with environments string.\n\n  ```sh\n  BROWSERSLIST_ENV=\"development\" npx vite build\n  ```\n\n- `BROWSERSLIST_STATS` with path to the custom usage data\n  for `> 1% in my stats` query.\n\n  ```sh\n  BROWSERSLIST_STATS=.\u002Fconfig\u002Fusage_data.json npx vite build\n  ```\n\n- `BROWSERSLIST_DISABLE_CACHE` if you want to disable config reading cache.\n\n  ```sh\n  BROWSERSLIST_DISABLE_CACHE=1 npx vite build\n  ```\n\n- `BROWSERSLIST_DANGEROUS_EXTEND` to disable security shareable config\n  name check.\n\n  ```sh\n  BROWSERSLIST_DANGEROUS_EXTEND=1 npx vite build\n  ```\n\n- `BROWSERSLIST_ROOT_PATH` to prevent reading files above this path.\n\n  ```sh\n  BROWSERSLIST_ROOT_PATH=. npx vite build\n  ```\n\n- `BROWSERSLIST_TRACE_WARNING` to find the source of update db warning.\n\n  ```sh\n  BROWSERSLIST_TRACE_WARNING=1 npx vite build\n  ```\n\n[environment variables]: https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FEnvironment_variable\n\n### `browserslist.coverage()`\n\nReturn browsers market coverage.\n\n```js\nconst browsers = browserslist('> 1% in US')\nbrowserslist.coverage(browsers, 'US') \u002F\u002F=> 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## 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## 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:\u002F\u002Ftidelift.com\u002Fsecurity\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:\u002F\u002Ftidelift.com\u002Fsubscription\u002Fpkg\u002Fnpm-browserslist?utm_source=npm-browserslist&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)\n\n## Browsers Data Updating\n\nSee [`update-browserslist-db` docs](https:\u002F\u002Fgithub.com\u002Fbrowserslist\u002Fupdate-db#readme)\n","Browserslist 是一个用于在不同前端工具之间共享目标浏览器和Node.js版本配置的项目。它支持Autoprefixer、Babel、postcss-preset-env等工具自动识别并应用开发者指定的浏览器版本列表，通过使用`caniuse-lite`库来解析如“最近2个版本”这样的查询语句，避免了手动更新版本信息的需求。适用于需要跨多种前端工具保持一致性的浏览器兼容性设置场景，例如在构建过程中统一处理CSS前缀添加或JavaScript编译选项等。",2,"2026-06-11 02:53:58","top_language"]