Skip to content
PluginStats

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.

View on npm Fresh · Oct 18, 2026

vite-plugin-browserslist-useragent has 5,207 recorded weekly downloads on npm, an increase of 15.1% over the past 30 days, ranking #1129 of 2,322 tracked listings.

Weekly downloads
5,207
Official API · Oct 18, 2026
7-day growth
-17.3%
-1.1K weekly downloads
30-day growth
+15.1%
+684 weekly downloads
90-day growth
-60.1%
-7.8K weekly downloads
Rank
#1129
Among tracked npm listings

About vite-plugin-browserslist-useragent

vite-plugin-browserslist-useragent

npm version npm downloads gitmoji

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:
last 2 versions
not dead
  1. Add plugin to vite.config.*:
// vite.config.ts
import SupportedBrowsers from 'vite-plugin-browserslist-useragent'
export default defineConfig({
  plugins: [SupportedBrowsers(/* options */)],
})
  1. Import RegExp from virtual module:
import { browsersRegex } from 'virtual:supported-browsers'

if (browsersRegex.test(navigator.userAgent)) {
  alert('Your browser is supported.')
}

Auto-generated virtual:supported-browsers:

export const browsersRegex =
  /Edge?\/(10[5-9]|1[1-9]\d|[2-9]\d\d|\d{4,})(\.\d+|)(\.\d+|)|Firefox\/(10[4-9]|1[1-9]\d|[2-9]\d\d|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(10[5-9]|1[1-9]\d|[2-9]\d\d|\d{4,})\.\d+(\.\d+|)|Maci.* Version\/(15\.([6-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(9\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]([6-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Opera Mini|Android:?[ /\-](10[6-9]|1[1-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/(6[4-9]|[7-9]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(10[5-9]|1[1-9]\d|[2-9]\d\d|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(10[6-9]|1[1-9]\d|[2-9]\d\d|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(13\.([4-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(1[7-9]|[2-9]\d|\d{3,})\.\d+|Android.+MQQBrowser\/(13(\.([1-9]|\d{2,})|)|(1[4-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(2\.([5-9]|\d{2,})|([3-9]|\d{2,})\.\d+)(\.\d+|)/
export const browsersRegexes = [
  {
    family: 'edge',
    sourceRegex: {},
    sourceRegexString: 'Edge?\\/(\\d+)(\\.(\\d+)|)(\\.(\\d+)|)',
    regex: {},
    requestVersions: [
      [105, 0, 0],
      [106, 0, 0],
    ],
    requestVersionsStrings: ['105.0.0', '106.0.0'],
    regexString: 'Edge?\\/(105|106)(\\.0|)(\\.\\d+|)',
  },
  /* ... */
]

Install

pnpm add -D vite-plugin-browserslist-useragent
# or
npm i -D vite-plugin-browserslist-useragent
# or
yarn add -D vite-plugin-browserslist-useragent

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[]

Compile browserslist query to regexes for each browser.

Options
OptionTypeDefaultDescription
browsersstring | string[]—Manually provide a browserslist query (or an array of queries). Specifying this overrides the browserslist configuration specified in your project.
envstring—When multiple browserslist environments are specified, pick the config belonging to this environment.
ignorePatchbooleantrueIgnore differences in patch browser numbers.
ignoreMinorbooleanfalseIgnore differences in minor browser versions.
allowHigherVersionsbooleanfalseFor 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.
allowZeroSubversionsbooleanfalseIgnore match of patch or patch and minor, if they are 0.
RegExp info object…

Description from the npm listing.

  • browserslist
  • regexp
  • vite-plugin
  • useragent

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

vite-plugin-browserslist-useragent weekly downloads on npm, last 90 days: 5,207 weekly downloads as of Oct 18, 2026, -60.1% over 90 days.vite-plugin-browserslist-useragentWeekly downloads on npm · Last 90 days5,207downloads / week-60.1% over 90 days02K4K6K8K10K12K14KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
vite-plugin-browserslist-useragent weekly downloads on npm, last 90 days: 5,207 weekly downloads as of Oct 18, 2026, -60.1% over 90 days.

7/30/90-day growth

vite-plugin-browserslist-useragent weekly downloads growth on npm: -17.3% over 7 days, +15.1% over 30 days, -60.1% over 90 days.vite-plugin-browserslist-useragentWeekly downloads growth on npm5,207downloads / week now7-day growth-1,086 weekly downloads-17.3%30-day growth+684 weekly downloads+15.1%90-day growth-7,846 weekly downloads-60.1%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
vite-plugin-browserslist-useragent weekly downloads growth on npm: -17.3% over 7 days, +15.1% over 30 days, -60.1% over 90 days.

Ranking history

vite-plugin-browserslist-useragent npm ranking history: currently #1129 (by weekly downloads).vite-plugin-browserslist-useragentnpm ranking · by weekly downloads · Last 90 days#1129current rank#1125#1130#1135#1140#1145#1150Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
vite-plugin-browserslist-useragent npm ranking history: currently #1129 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,162 shown · page 57, #12 (overall #1,132)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins253 listings · 13 pages · page 11, #6 (overall #206)
Vite plugins: every listing in weekly downloads order

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.

Each band is one page of 20. Weekly downloads on a linear 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.

Recent observations

Full history (122)
Recent weekly downloads observations for vite-plugin-browserslist-useragent
Date (UTC)Weekly downloadsChange vs. previous
5,207+1.1K
4,067-648
4,715+603
4,112-1.3K
5,381-1.1K
6,4850
6,485+192
6,293+275
6,018+277
5,741+36
5,705+226
5,479+241
5,238-988
6,226—

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 20, 2026. See the methodology.