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 · Dec 6, 2026

vite-plugin-browserslist-useragent has 9,864 recorded weekly downloads on npm, an increase of 52.2% over the past 30 days, ranking #1270 of 3,247 tracked listings.

Weekly downloads
9,864
Official API · Dec 5, 2026
7-day growth
+25.8%
+2K weekly downloads
30-day growth
+52.2%
+3.4K weekly downloads
90-day growth
+55.2%
+3.5K weekly downloads
Rank
#1270
▲ 63 in 7 days

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: 9,864 weekly downloads as of Dec 5, 2026, +55.2% over 90 days.vite-plugin-browserslist-useragentWeekly downloads on npm · Last 90 days9,864downloads / week+55.2% over 90 days02K4K6K8K10K12KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-plugin-browserslist-useragent weekly downloads on npm, last 90 days: 9,864 weekly downloads as of Dec 5, 2026, +55.2% over 90 days.

7/30/90-day growth

vite-plugin-browserslist-useragent weekly downloads growth on npm: +25.8% over 7 days, +52.2% over 30 days, +55.2% over 90 days.vite-plugin-browserslist-useragentWeekly downloads growth on npm9,864downloads / week now7-day growth+2,021 weekly downloads+25.8%30-day growth+3,381 weekly downloads+52.2%90-day growth+3,509 weekly downloads+55.2%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-browserslist-useragent weekly downloads growth on npm: +25.8% over 7 days, +52.2% over 30 days, +55.2% over 90 days.

Ranking history

vite-plugin-browserslist-useragent npm ranking history: currently #1270 (by weekly downloads).vite-plugin-browserslist-useragentnpm ranking · by weekly downloads · Last 90 days#1270current rank#1100#1150#1200#1250#1300#1350#1400#1450Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-browserslist-useragent npm ranking history: currently #1270 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 64, #10 (overall #1,270)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 12, #13 (overall #233)
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 (170)
Recent weekly downloads observations for vite-plugin-browserslist-useragent
Date (UTC)Weekly downloadsChange vs. previous
9,864+45
9,819+535
9,284+540
8,744-69
8,813+537
8,276+246
8,030+187
7,843-3
7,846-426
8,272+295
7,977-207
8,184-253
8,437-606
9,043—

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