1 | # Browserslist [![Cult Of Martians][cult-img]][cult]
|
2 |
|
3 | <img width="120" height="120" alt="Browserslist logo by Anton Lovchikov"
|
4 | src="https://browserslist.github.io/browserslist/logo.svg" align="right">
|
5 |
|
6 | The config to share target browsers and Node.js versions between different
|
7 | front-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 |
|
17 | All tools will find target browsers automatically,
|
18 | when you add the following to `package.json`:
|
19 |
|
20 | ```js
|
21 | "browserslist": [
|
22 | "defaults",
|
23 | "not IE 11",
|
24 | "not IE_Mob 11",
|
25 | "maintained node versions",
|
26 | ]
|
27 | ```
|
28 |
|
29 | Or in `.browserslistrc` config:
|
30 |
|
31 | ```yaml
|
32 | # Browsers that we support
|
33 |
|
34 | defaults
|
35 | not IE 11
|
36 | not IE_Mob 11
|
37 | maintained node versions
|
38 | ```
|
39 |
|
40 | Developers set versions list in queries like `last 2 version`
|
41 | to be free from updating versions manually.
|
42 | Browserslist will use [`caniuse-lite`] with [Can I Use] data for this queries.
|
43 |
|
44 | Browserslist will take queries from tool option,
|
45 | `browserslist` config, `.browserslistrc` config,
|
46 | `browserslist` section in `package.json` or environment variables.
|
47 |
|
48 | [Browserslist Example] shows how every tool uses Browserslist.
|
49 |
|
50 | [cult-img]: https://cultofmartians.com/assets/badges/badge.svg
|
51 | [cult]: https://cultofmartians.com/done.html
|
52 |
|
53 | <a href="https://evilmartians.com/?utm_source=browserslist">
|
54 | <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
|
55 | alt="Sponsored by Evil Martians" width="236" height="54">
|
56 | </a>
|
57 |
|
58 | [stylelint-no-unsupported-browser-features]: https://github.com/ismay/stylelint-no-unsupported-browser-features
|
59 | [eslint-plugin-compat]: https://github.com/amilajack/eslint-plugin-compat
|
60 | [Browserslist Example]: https://github.com/browserslist/browserslist-example
|
61 | [postcss-preset-env]: https://github.com/jonathantneal/postcss-preset-env
|
62 | [postcss-normalize]: https://github.com/jonathantneal/postcss-normalize
|
63 | [`caniuse-lite`]: https://github.com/ben-eb/caniuse-lite
|
64 | [Autoprefixer]: https://github.com/postcss/autoprefixer
|
65 | [Can I Use]: https://caniuse.com/
|
66 | [Babel]: https://github.com/babel/babel/tree/master/packages/babel-preset-env
|
67 | [obsolete-webpack-plugin]: https://github.com/ElemeFE/obsolete-webpack-plugin
|
68 |
|
69 | ## Table of Contents
|
70 |
|
71 | 1. [Tools](#tools)
|
72 | 2. [Best Practices](#best-practices)
|
73 | 3. [Queries](#queries)
|
74 | 4. [Config File](#config-file)
|
75 | 5. [Shareable Configs](#shareable-configs)
|
76 | 6. [Configuring for Different Environments](#configuring-for-different-environments)
|
77 | 7. [Custom Usage Data](#custom-usage-data)
|
78 | 8. [JS API](#js-api)
|
79 | 9. [Environment Variables](#environment-variables)
|
80 | 10. [Cache](#cache)
|
81 |
|
82 | ## Tools
|
83 |
|
84 | * [`browserl.ist`](https://browserl.ist/) is an online tool to check
|
85 | what browsers will be selected by some query.
|
86 | * [`browserslist-ga`] and [`browserslist-ga-export`] download your website
|
87 | browsers statistics to use it in `> 0.5% in my stats` query.
|
88 | * [`browserslist-useragent-regexp`] compiles Browserslist query to a RegExp
|
89 | to test browser useragent.
|
90 | * [`browserslist-useragent-ruby`] is a Ruby library to checks browser
|
91 | by user agent string to match Browserslist.
|
92 | * [`browserslist-browserstack`] runs BrowserStack tests for all browsers
|
93 | in Browserslist config.
|
94 | * [`caniuse-api`] returns browsers which support some specific feature.
|
95 | * Run `npx browserslist` in your project directory to see project’s
|
96 | target browsers. This CLI tool is built-in and available in any project
|
97 | with Autoprefixer.
|
98 |
|
99 | [`browserslist-useragent-regexp`]: https://github.com/browserslist/browserslist-useragent-regexp
|
100 | [`browserslist-useragent-ruby`]: https://github.com/browserslist/browserslist-useragent-ruby
|
101 | [`browserslist-browserstack`]: https://github.com/xeroxinteractive/browserslist-browserstack
|
102 | [`browserslist-ga-export`]: https://github.com/browserslist/browserslist-ga-export
|
103 | [`browserslist-useragent`]: https://github.com/pastelsky/browserslist-useragent
|
104 | [`browserslist-ga`]: https://github.com/browserslist/browserslist-ga
|
105 | [`caniuse-api`]: https://github.com/Nyalab/caniuse-api
|
106 |
|
107 |
|
108 | ## Best Practices
|
109 |
|
110 | * There is a `defaults` query, which gives a reasonable configuration
|
111 | for most users:
|
112 |
|
113 | ```json
|
114 | "browserslist": [
|
115 | "defaults"
|
116 | ]
|
117 | ```
|
118 |
|
119 | * If you want to change the default set of browsers we recommend to combine
|
120 | `last 2 versions`, `not dead` with a usage number like `> 0.2%`. This is
|
121 | because `last n versions` on its own does not add popular old versions while
|
122 | only using a percentage above `0.2%` will in the long run make popular
|
123 | browsers even more popular. We might run into a monopoly and stagnation
|
124 | situation, as we had with Internet Explorer 6. Please use this setting
|
125 | with caution.
|
126 | * Select browsers directly (`last 2 Chrome versions`) only if you are making
|
127 | a web app for a kiosk with one browser. There are a lot of browsers
|
128 | on the market. If you are making general web app you should respect
|
129 | browsers diversity.
|
130 | * Don’t remove browsers just because you don’t know them. Opera Mini has
|
131 | 100 million users in Africa and it is more popular in the global market
|
132 | than Microsoft Edge. Chinese QQ Browsers has more market share than Firefox
|
133 | and desktop Safari combined.
|
134 |
|
135 |
|
136 | ## Queries
|
137 |
|
138 | Browserslist will use browsers and Node.js versions query
|
139 | from one of these sources:
|
140 |
|
141 | 1. `browserslist` key in `package.json` file in current or parent directories.
|
142 | **We recommend this way.**
|
143 | 2. `.browserslistrc` config file in current or parent directories.
|
144 | 3. `browserslist` config file in current or parent directories.
|
145 | 4. `BROWSERSLIST` environment variable.
|
146 | 5. If the above methods did not produce a valid result
|
147 | Browserslist will use defaults:
|
148 | `> 0.5%, last 2 versions, Firefox ESR, not dead`.
|
149 |
|
150 |
|
151 | ### Query Composition
|
152 |
|
153 | An `or` combiner can use the keyword `or` as well as `,`.
|
154 | `last 1 version or > 1%` is equal to `last 1 version, > 1%`.
|
155 |
|
156 | `and` query combinations are also supported to perform an
|
157 | intersection of the previous query: `last 1 version and > 1%`.
|
158 |
|
159 | There is 3 different ways to combine queries as depicted below. First you start
|
160 | with a single query and then we combine the queries to get our final list.
|
161 |
|
162 | Obviously you can *not* start with a `not` combiner, since there is no left-hand
|
163 | side query to combine it with.
|
164 |
|
165 | | Query combiner type | Illustration | Example |
|
166 | | ------------------- | :----------: | ------- |
|
167 | |`or`/`,` combiner <br> (union) | ![Union of queries](img/union.svg) | `> .5% or last 2 versions` <br> `> .5%, last 2 versions` |
|
168 | | `and` combiner <br> (intersection) | ![intersection of queries](img/intersection.svg) | `> .5% and last 2 versions` |
|
169 | | `not` combiner <br> (relative complement) | ![Relative complement of queries](img/complement.svg) | `> .5% and not last 2 versions` <br> `> .5% or not last 2 versions` <br> `> .5%, not last 2 versions` |
|
170 |
|
171 | _A quick way to test your query is to do `npx browserslist '> 0.5%, not IE 11'`
|
172 | in your terminal._
|
173 |
|
174 |
|
175 | ### Full List
|
176 |
|
177 | You can specify the browser and Node.js versions by queries (case insensitive):
|
178 |
|
179 | * `defaults`: Browserslist’s default browsers
|
180 | (`> 0.5%, last 2 versions, Firefox ESR, not dead`).
|
181 | * `> 5%`: browsers versions selected by global usage statistics.
|
182 | `>=`, `<` and `<=` work too.
|
183 | * `> 5% in US`: uses USA usage statistics. It accepts [two-letter country code].
|
184 | * `> 5% in alt-AS`: uses Asia region usage statistics. List of all region codes
|
185 | can be found at [`caniuse-lite/data/regions`].
|
186 | * `> 5% in my stats`: uses [custom usage data].
|
187 | * `> 5% in browserslist-config-mycompany stats`: uses [custom usage data]
|
188 | from `browserslist-config-mycompany/browserslist-stats.json`.
|
189 | * `cover 99.5%`: most popular browsers that provide coverage.
|
190 | * `cover 99.5% in US`: same as above, with [two-letter country code].
|
191 | * `cover 99.5% in my stats`: uses [custom usage data].
|
192 | * `maintained node versions`: all Node.js versions, which are [still maintained]
|
193 | by Node.js Foundation.
|
194 | * `node 10` and `node 10.4`: selects latest Node.js `10.x.x`
|
195 | or `10.4.x` release.
|
196 | * `current node`: Node.js version used by Browserslist right now.
|
197 | * `extends browserslist-config-mycompany`: take queries from
|
198 | `browserslist-config-mycompany` npm package.
|
199 | * `ie 6-8`: selects an inclusive range of versions.
|
200 | * `Firefox > 20`: versions of Firefox newer than 20.
|
201 | `>=`, `<` and `<=` work too. It also works with Node.js.
|
202 | * `iOS 7`: the iOS browser version 7 directly.
|
203 | * `Firefox ESR`: the latest [Firefox ESR] version.
|
204 | * `PhantomJS 2.1` and `PhantomJS 1.9`: selects Safari versions similar
|
205 | to PhantomJS runtime.
|
206 | * `unreleased versions` or `unreleased Chrome versions`:
|
207 | alpha and beta versions.
|
208 | * `last 2 major versions` or `last 2 iOS major versions`:
|
209 | all minor/patch releases of last 2 major versions.
|
210 | * `since 2015` or `last 2 years`: all versions released since year 2015
|
211 | (also `since 2015-03` and `since 2015-03-10`).
|
212 | * `dead`: browsers without official support or updates for 24 months.
|
213 | Right now it is `IE 10`, `IE_Mob 10`, `BlackBerry 10`, `BlackBerry 7`,
|
214 | `Samsung 4` and `OperaMobile 12.1`.
|
215 | * `last 2 versions`: the last 2 versions for *each* browser.
|
216 | * `last 2 Chrome versions`: the last 2 versions of Chrome browser.
|
217 | * `not ie <= 8`: exclude browsers selected by previous queries.
|
218 |
|
219 | You can add `not ` to any query.
|
220 |
|
221 | [`caniuse-lite/data/regions`]: https://github.com/ben-eb/caniuse-lite/tree/master/data/regions
|
222 | [two-letter country code]: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
223 | [custom usage data]: #custom-usage-data
|
224 | [still maintained]: https://github.com/nodejs/Release
|
225 | [Can I Use]: https://caniuse.com/
|
226 |
|
227 |
|
228 | ### Debug
|
229 |
|
230 | Run `npx browserslist` in project directory to see what browsers was selected
|
231 | by your queries.
|
232 |
|
233 | ```sh
|
234 | $ npx browserslist
|
235 | and_chr 61
|
236 | and_ff 56
|
237 | and_qq 1.2
|
238 | and_uc 11.4
|
239 | android 56
|
240 | baidu 7.12
|
241 | bb 10
|
242 | chrome 62
|
243 | edge 16
|
244 | firefox 56
|
245 | ios_saf 11
|
246 | opera 48
|
247 | safari 11
|
248 | samsung 5
|
249 | ```
|
250 |
|
251 |
|
252 | ### Browsers
|
253 |
|
254 | Names are case insensitive:
|
255 |
|
256 | * `Android` for Android WebView.
|
257 | * `Baidu` for Baidu Browser.
|
258 | * `BlackBerry` or `bb` for Blackberry browser.
|
259 | * `Chrome` for Google Chrome.
|
260 | * `ChromeAndroid` or `and_chr` for Chrome for Android
|
261 | * `Edge` for Microsoft Edge.
|
262 | * `Electron` for Electron framework. It will be converted to Chrome version.
|
263 | * `Explorer` or `ie` for Internet Explorer.
|
264 | * `ExplorerMobile` or `ie_mob` for Internet Explorer Mobile.
|
265 | * `Firefox` or `ff` for Mozilla Firefox.
|
266 | * `FirefoxAndroid` or `and_ff` for Firefox for Android.
|
267 | * `iOS` or `ios_saf` for iOS Safari.
|
268 | * `Node` for Node.js.
|
269 | * `Opera` for Opera.
|
270 | * `OperaMini` or `op_mini` for Opera Mini.
|
271 | * `OperaMobile` or `op_mob` for Opera Mobile.
|
272 | * `QQAndroid` or `and_qq` for QQ Browser for Android.
|
273 | * `Safari` for desktop Safari.
|
274 | * `Samsung` for Samsung Internet.
|
275 | * `UCAndroid` or `and_uc` for UC Browser for Android.
|
276 | * `kaios` for KaiOS Browser.
|
277 |
|
278 |
|
279 | ## Config File
|
280 |
|
281 | ### `package.json`
|
282 |
|
283 | If you want to reduce config files in project root, you can specify
|
284 | browsers in `package.json` with `browserslist` key:
|
285 |
|
286 | ```json
|
287 | {
|
288 | "private": true,
|
289 | "dependencies": {
|
290 | "autoprefixer": "^6.5.4"
|
291 | },
|
292 | "browserslist": [
|
293 | "last 1 version",
|
294 | "> 1%",
|
295 | "IE 10"
|
296 | ]
|
297 | }
|
298 | ```
|
299 |
|
300 |
|
301 | ### `.browserslistrc`
|
302 |
|
303 | Separated Browserslist config should be named `.browserslistrc`
|
304 | and have browsers queries split by a new line. Comments starts with `#` symbol:
|
305 |
|
306 | ```yaml
|
307 | # Browsers that we support
|
308 |
|
309 | last 1 version
|
310 | > 1%
|
311 | IE 10 # sorry
|
312 | ```
|
313 |
|
314 | Browserslist will check config in every directory in `path`.
|
315 | So, if tool process `app/styles/main.css`, you can put config to root,
|
316 | `app/` or `app/styles`.
|
317 |
|
318 | You can specify direct path in `BROWSERSLIST_CONFIG` environment variables.
|
319 |
|
320 |
|
321 | ## Shareable Configs
|
322 |
|
323 | You can use the following query to reference an exported Browserslist config
|
324 | from another package:
|
325 |
|
326 | ```json
|
327 | "browserslist": [
|
328 | "extends browserslist-config-mycompany"
|
329 | ]
|
330 | ```
|
331 |
|
332 | For security reasons, external configuration only supports packages that have
|
333 | the `browserslist-config-` prefix. npm scoped packages are also supported, by
|
334 | naming or prefixing the module with `@scope/browserslist-config`, such as
|
335 | `@scope/browserslist-config` or `@scope/browserslist-config-mycompany`.
|
336 |
|
337 | If you don’t accept Browserslist queries from users, you can disable the
|
338 | validation by using the `dangerousExtend` option:
|
339 |
|
340 | ```js
|
341 | browserslist(queries, { path, dangerousExtend: true })
|
342 | ```
|
343 |
|
344 | Because this uses `npm`'s resolution, you can also reference specific files
|
345 | in a package:
|
346 |
|
347 | ```json
|
348 | "browserslist": [
|
349 | "extends browserslist-config-mycompany/desktop",
|
350 | "extends browserslist-config-mycompany/mobile"
|
351 | ]
|
352 | ```
|
353 |
|
354 | When writing a shared Browserslist package, just export an array.
|
355 | `browserslist-config-mycompany/index.js`:
|
356 |
|
357 | ```js
|
358 | module.exports = [
|
359 | 'last 1 version',
|
360 | '> 1%',
|
361 | 'ie 10'
|
362 | ]
|
363 | ```
|
364 |
|
365 | You can also include a `browserslist-stats.json` file as part of your shareable
|
366 | config at the root and query it using `> 5% in browserslist-config-mycompany stats`.
|
367 | It uses the same format as `extends` and the `dangerousExtend` property as above.
|
368 |
|
369 |
|
370 | ## Configuring for Different Environments
|
371 |
|
372 | You can also specify different browser queries for various environments.
|
373 | Browserslist will choose query according to `BROWSERSLIST_ENV` or `NODE_ENV`
|
374 | variables. If none of them is declared, Browserslist will firstly look
|
375 | for `production` queries and then use defaults.
|
376 |
|
377 | In `package.json`:
|
378 |
|
379 | ```js
|
380 | "browserslist": {
|
381 | "production": [
|
382 | "> 1%",
|
383 | "ie 10"
|
384 | ],
|
385 | "modern": [
|
386 | "last 1 chrome version",
|
387 | "last 1 firefox version"
|
388 | ],
|
389 | "ssr": [
|
390 | "node 12"
|
391 | ]
|
392 | }
|
393 | ```
|
394 |
|
395 | In `.browserslistrc` config:
|
396 |
|
397 | ```ini
|
398 | [production]
|
399 | > 1%
|
400 | ie 10
|
401 |
|
402 | [modern]
|
403 | last 1 chrome version
|
404 | last 1 firefox version
|
405 |
|
406 | [ssr]
|
407 | node 12
|
408 | ```
|
409 |
|
410 |
|
411 | ## Custom Usage Data
|
412 |
|
413 | If you have a website, you can query against the usage statistics of your site.
|
414 | [`browserslist-ga`] will ask access to Google Analytics and then generate
|
415 | `browserslist-stats.json`:
|
416 |
|
417 | ```
|
418 | npx browserslist-ga
|
419 | ```
|
420 |
|
421 | Or you can use [`browserslist-ga-export`] to convert Google Analytics data without giving a password for Google account.
|
422 |
|
423 | You can generate usage statistics file by any other method. File format should
|
424 | be like:
|
425 |
|
426 | ```js
|
427 | {
|
428 | "ie": {
|
429 | "6": 0.01,
|
430 | "7": 0.4,
|
431 | "8": 1.5
|
432 | },
|
433 | "chrome": {
|
434 | …
|
435 | },
|
436 | …
|
437 | }
|
438 | ```
|
439 |
|
440 | Note that you can query against your custom usage data while also querying
|
441 | against global or regional data. For example, the query
|
442 | `> 1% in my stats, > 5% in US, 10%` is permitted.
|
443 |
|
444 | [`browserslist-ga-export`]: https://github.com/browserslist/browserslist-ga-export
|
445 | [`browserslist-ga`]: https://github.com/browserslist/browserslist-ga
|
446 | [Can I Use]: https://caniuse.com/
|
447 |
|
448 |
|
449 | ## JS API
|
450 |
|
451 | ```js
|
452 | const browserslist = require('browserslist')
|
453 |
|
454 | // Your CSS/JS build tool code
|
455 | function process (source, opts) {
|
456 | const browsers = browserslist(opts.overrideBrowserslist, {
|
457 | stats: opts.stats,
|
458 | path: opts.file,
|
459 | env: opts.env
|
460 | })
|
461 | // Your code to add features for selected browsers
|
462 | }
|
463 | ```
|
464 |
|
465 | Queries can be a string `"> 1%, IE 10"`
|
466 | or an array `['> 1%', 'IE 10']`.
|
467 |
|
468 | If a query is missing, Browserslist will look for a config file.
|
469 | You can provide a `path` option (that can be a file) to find the config file
|
470 | relatively to it.
|
471 |
|
472 | Options:
|
473 |
|
474 | * `path`: file or a directory path to look for config file. Default is `.`.
|
475 | * `env`: what environment section use from config. Default is `production`.
|
476 | * `stats`: custom usage statistics data.
|
477 | * `config`: path to config if you want to set it manually.
|
478 | * `ignoreUnknownVersions`: do not throw on direct query (like `ie 12`).
|
479 | Default is `false.`
|
480 | * `dangerousExtend`: Disable security checks for `extend` query.
|
481 | Default is `false.`
|
482 | * `mobileToDesktop`: Use desktop browsers if Can I Use doesn’t have data
|
483 | about this mobile version. For instance, Browserslist will return
|
484 | `chrome 20` on `and_chr 20` query (Can I Use has only data only about
|
485 | latest versions of mobile browsers). Default is `false`.
|
486 |
|
487 | For non-JS environment and debug purpose you can use CLI tool:
|
488 |
|
489 | ```sh
|
490 | browserslist "> 1%, IE 10"
|
491 | ```
|
492 |
|
493 | You can get total users coverage for selected browsers by JS API:
|
494 |
|
495 | ```js
|
496 | browserslist.coverage(browserslist('> 1%'))
|
497 | //=> 81.4
|
498 | ```
|
499 |
|
500 | ```js
|
501 | browserslist.coverage(browserslist('> 1% in US'), 'US')
|
502 | //=> 83.1
|
503 | ```
|
504 |
|
505 | ```js
|
506 | browserslist.coverage(browserslist('> 1% in my stats'), 'my stats')
|
507 | //=> 83.1
|
508 | ```
|
509 |
|
510 | ```js
|
511 | browserslist.coverage(browserslist('> 1% in my stats', { stats }), stats)
|
512 | //=> 82.2
|
513 | ```
|
514 |
|
515 | Or by CLI:
|
516 |
|
517 | ```sh
|
518 | $ browserslist --coverage "> 1%"
|
519 | These browsers account for 81.4% of all users globally
|
520 | ```
|
521 |
|
522 | ```sh
|
523 | $ browserslist --coverage=US "> 1% in US"
|
524 | These browsers account for 83.1% of all users in the US
|
525 | ```
|
526 |
|
527 | ```sh
|
528 | $ browserslist --coverage "> 1% in my stats"
|
529 | These browsers account for 83.1% of all users in custom statistics
|
530 | ```
|
531 |
|
532 | ```sh
|
533 | $ browserslist --coverage "> 1% in my stats" --stats=./stats.json
|
534 | These browsers account for 83.1% of all users in custom statistics
|
535 | ```
|
536 |
|
537 |
|
538 | ## Environment Variables
|
539 |
|
540 | If some tool use Browserslist inside, you can change browsers settings
|
541 | by [environment variables]:
|
542 |
|
543 | * `BROWSERSLIST` with browsers queries.
|
544 |
|
545 | ```sh
|
546 | BROWSERSLIST="> 5%" gulp css
|
547 | ```
|
548 |
|
549 | * `BROWSERSLIST_CONFIG` with path to config file.
|
550 |
|
551 | ```sh
|
552 | BROWSERSLIST_CONFIG=./config/browserslist gulp css
|
553 | ```
|
554 |
|
555 | * `BROWSERSLIST_ENV` with environments string.
|
556 |
|
557 | ```sh
|
558 | BROWSERSLIST_ENV="development" gulp css
|
559 | ```
|
560 |
|
561 | * `BROWSERSLIST_STATS` with path to the custom usage data
|
562 | for `> 1% in my stats` query.
|
563 |
|
564 | ```sh
|
565 | BROWSERSLIST_STATS=./config/usage_data.json gulp css
|
566 | ```
|
567 |
|
568 | * `BROWSERSLIST_DISABLE_CACHE` if you want to disable config reading cache.
|
569 |
|
570 | ```sh
|
571 | BROWSERSLIST_DISABLE_CACHE=1 gulp css
|
572 | ```
|
573 |
|
574 | [environment variables]: https://en.wikipedia.org/wiki/Environment_variable
|
575 |
|
576 |
|
577 | ## Cache
|
578 |
|
579 | Browserslist caches the configuration it reads from `package.json` and
|
580 | `browserslist` files, as well as knowledge about the existence of files,
|
581 | for the duration of the hosting process.
|
582 |
|
583 | To clear these caches, use:
|
584 |
|
585 | ```js
|
586 | browserslist.clearCaches()
|
587 | ```
|
588 |
|
589 | To disable the caching altogether, set the `BROWSERSLIST_DISABLE_CACHE`
|
590 | environment variable.
|
591 |
|
592 |
|
593 | ## Security Contact
|
594 |
|
595 | To report a security vulnerability, please use the [Tidelift security contact].
|
596 | Tidelift will coordinate the fix and disclosure.
|
597 |
|
598 | [Tidelift security contact]: https://tidelift.com/security
|