Skip to content
PluginStats

vite-plugin-treat-umd-as-commonjs weekly downloads statistics

By pakholeung37 (2 listings) · npm · Vite plugins

resolve some edge cases when using requireJS/amd in browser with vite

View on npm Stale · Oct 18, 2026

vite-plugin-treat-umd-as-commonjs has 5,343 recorded weekly downloads on npm, a decrease of 18.4% over the past 30 days.

Weekly downloads
5,343
Official API · Oct 18, 2026
7-day growth
-41.0%
-3.7K weekly downloads
30-day growth
-18.4%
-1.2K weekly downloads
90-day growth
-24.1%
-1.7K weekly downloads
Rank
—
Among tracked npm listings

About vite-plugin-treat-umd-as-commonjs

vite-plugin-treat-umd-as-commonjs

Make code runs when using requireJS/amd in browser with vite. This plugin is for a paticular edge case. check RequireJS environment in browser will break the UMD module conversion

NPM

Usage

// vite.config.js
const { defineConfig } = require("vite");
const { treatAsCommonjs } = require("vite-plugin-treat-umd-as-commonjs");

module.exports = defineConfig({
  plugins: [treatAsCommonjs()],
});

It will simple add var define = false; in modules from node_modules by default which avoid the browser requireJS/amd environment to register the module to amd. You can also specifically include or exclude pattern.

Options

type Options = {
  // moduleId/files to include
  indluce?: Array<string | RegExp> | string | RegExp
  // moduleId/files to exclude
  exclude?: Array<string | RegExp> | string | RegExp
}

License

MIT

Description from the npm listing.

  • vite
  • vite-plugin
  • commonjs
  • cjs
  • umd
  • requirejs
  • require-js
  • amd

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-treat-umd-as-commonjs weekly downloads on npm, last 90 days: 5,343 weekly downloads as of Oct 18, 2026, -24.1% over 90 days.vite-plugin-treat-umd-as-commonjsWeekly downloads on npm · Last 90 days5,343downloads / week-24.1% over 90 days02K4K6K8K10K12KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 26, 2026 – Oct 18, 2026 · 85 observations · Updated Oc…pluginstats.com
vite-plugin-treat-umd-as-commonjs weekly downloads on npm, last 90 days: 5,343 weekly downloads as of Oct 18, 2026, -24.1% over 90 days.

7/30/90-day growth

vite-plugin-treat-umd-as-commonjs weekly downloads growth on npm: -41.0% over 7 days, -18.4% over 30 days, -24.1% over 90 days.vite-plugin-treat-umd-as-commonjsWeekly downloads growth on npm5,343downloads / week now7-day growth-3,712 weekly downloads-41.0%30-day growth-1,201 weekly downloads-18.4%90-day growth-1,694 weekly downloads-24.1%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
vite-plugin-treat-umd-as-commonjs weekly downloads growth on npm: -41.0% over 7 days, -18.4% over 30 days, -24.1% over 90 days.

Ranking history

vite-plugin-treat-umd-as-commonjs npm ranking history: currently #1129 (by weekly downloads).vite-plugin-treat-umd-as-commonjsnpm ranking · by weekly downloads · Last 90 days#1129current rank#1080#1090#1100#1110#1120#1130#1140Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 18, 2026 – Oct 21, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
vite-plugin-treat-umd-as-commonjs npm ranking history: currently #1129 (by weekly downloads).

Listing placement

All npm2,429 listings · 122 pages · 1,215 shown · page 58, #5 (overall #1,145)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins258 listings · 13 pages · page 11, #5 (overall #205)
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-treat-umd-as-commonjs
Date (UTC)Weekly downloadsChange vs. previous
5,343+268
5,075-778
5,853+457
5,396-1.8K
7,241-2.3K
9,5840
9,584+529
9,055+20
9,035+39
8,996-136
9,132-420
9,552+370
9,182-1.8K
10,962—

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-treat-umd-as-commonjs. First seen Oct 16, 2026; last successful collection Oct 23, 2026. See the methodology.