vite-plugin-browserslist-useragent weekly downloads statistics
By kingyue737 · npm · Vite plugins
A utility vite plugin to compile browserslist query to a RegExp to test browser useragent.
vite-plugin-browserslist-useragent has 4,067 recorded weekly downloads on npm, a decrease of 8.6% over the past 30 days.
It ranks #1146 of 2,256 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by -69.8%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About vite-plugin-browserslist-useragent
vite-plugin-browserslist-useragent
A vite plugin wrapping browserslist-useragent-regexp which provides utility RegExps compiled by browserslist query to test browser useragent.
Simplest example: you can detect supported browsers on client-side.
1. Create .browserslistrc config, for example like this:
2. Add plugin to vite.config.*:
3. Import RegExp from virtual module:
Auto-generated virtual:supported-browsers:
Install
Why?
https://github.com/browserslist/browserslist-useragent-regexp#why
Why wrap browserslist-useragent-regexp with vite plugin?
Let Vite transform and bundle for you and no need to run CLI every time you change browserslist.
Virtual Module
Virtual module virtual:supported-browsers exposes two variables returned by the following two methods of browserslist-useragent-regexp whose arguments are passed from plugin's options:
getUserAgentRegex(options)=> browsersRegexp: RegExp
Compile browserslist query to one regex.
[getUserAgentRegexs(options)=> browsersRegexps: BrowserVersionedRegex[]](https://browserslist.github.io/browserslist-useragent-regexp/functions/getUserAgentRegexes.html)
Compile browserslist query to regexes for each browser.
Options
| Option | Type | Default | Description |
| browsers | string \| string[] | — | Manually provide a browserslist query (or an array of queries). Specifying this overrides the browserslist configuration specified in your project. | | env | string | — | When multiple browserslist environments are specified, pick the config belonging to this environment. | | ignorePatch | boolean | true | Ignore differences in patch browser numbers. | | ignoreMinor | boolean | false | Ignore differences in minor browser versions. | | allowHigherVersions | boolean | false | For all the browsers in the browserslist query, return a match if the useragent version is equal to or higher than the one specified in browserslist. | | allowZeroSubversions | boolean | false | Ignore match of patch or patch and minor, if they are 0. |
RegExp info object
| Property | Type | Description |
| family | string | Browser family. | | requestVersions | [number, number, number][] | Versions provided by browserslist. | | regex | RegExp | Regex to match useragent with family and versions. | | sourceRegex | RegExp | Original useragent regex, without versions. | | version | [number, number, number] \| null | Useragent version of regex. | | minVersion | [number, number, number] \| null | Useragent min version of regex. | | maxVersion | [number, number, number] \| null | Useragent max version of regex. |
Client Types
If you want type definition of virtual:supported-browsers, add vite-plugin-browserslist-useragent/client to compilerOptions.types of your tsconfig:
License
MIT License © 2022 Yue JIN
Description from the npm listing.
- browserslist
- regexp
- vite-plugin
- useragent
Where vite-plugin-browserslist-useragent sits in the listing
Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Recent observations
Full history (121)Similar npm Vite plugins plugins
Data source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/vite-plugin-browserslist-useragent. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.