Skip to content
PluginStats

vite-plugin-optimize-css-modules weekly downloads statistics

By simonwep · npm · Vite plugins

Mangles the classnames generated by postcss-modules in vite

View on npm Fresh · Oct 17, 2026

vite-plugin-optimize-css-modules has 14,239 recorded weekly downloads on npm, a decrease of 22.9% over the past 30 days.

It ranks #836 of 2,251 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by +6.1%.

PluginStats has 542 daily observations since Apr 24, 2025; the latest is from Oct 17, 2026.

Weekly downloads
14,239
Official API · Oct 17, 2026
7-day growth
-50.8%
-14.7K weekly downloads
30-day growth
-22.9%
-4.2K weekly downloads
90-day growth
+6.1%
+818 weekly downloads
Rank
#836
Among tracked npm listings

About vite-plugin-optimize-css-modules

Vite Plugin - Optimize CSS Modules

Mangle classnames in production - save up to 30% on css and 90% of build time for free!

Setup

This plugin requires vite of v3 or greater. It only makes sense to use if you're using css modules.

In your vite.config.ts simply add the plugin:

And that's it. When running vite build your generated CSS should be significantly smaller.

Benchmarks

Benchmarks are done against bootstrap and materialize.css assuming all the classes are used as css modules. The benchmark code is located in the benchmarks directory.

Run them by building the plugin via npm run build and then running npm run benchmarks. The results below are from a MacBook Air M2 with node v22.8.0, ran on the 31th December 2024.

| Input | Build Time | Gzip Size | Brotli Size |

| bootstrap-5.0.2.module.css | 525ms (_-94.06%_ / _-8311ms_) | 21.3 kB (_-26.53%_ / _-7.69 kB_) | 21.3 kB (_-27.54%_ / _-6 kB_) | | materialize-1.0.0.module.css | 572ms (_-92.59%_ / _-7156ms_) | 20.1 kB (_-19.70%_ / _-4.93 kB_) | 20.1 kB (_-21.33%_ / _-4.3 kB_) |

How does it work?

By default, when using css modules, you end up with hashes or other long class-names in your bundled css files:

By using this module, the smalles possible classname will be used for each "id":

Description from the npm listing.

  • vite
  • vite-plugin
  • css-modules
  • css
  • minify

Where vite-plugin-optimize-css-modules 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.

All npm2,248 listings · 113 pages · page 42, #16 (overall #836)
All npm: every listing in weekly downloads order
PNG SVG
Vite plugins250 listings · 13 pages · page 7, #16 (overall #136)
Vite plugins: every listing in weekly downloads order
PNG SVG

Charts

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

Adoption over time

vite-plugin-optimize-css-modules weekly downloads on npm, last 90 days: 14,239 weekly downloads as of Oct 17, 2026, +6.1% over 90 days.vite-plugin-optimize-css-modulesWeekly downloads on npm · Last 90 days14,239downloads / week+6.1% over 90 days05K10K15K20K25K30K35KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
vite-plugin-optimize-css-modules weekly downloads on npm, last 90 days: 14,239 weekly downloads as of Oct 17, 2026, +6.1% over 90 days.
PNG SVG

7/30/90-day growth

vite-plugin-optimize-css-modules weekly downloads growth on npm: -50.8% over 7 days, -22.9% over 30 days, +6.1% over 90 days.vite-plugin-optimize-css-modulesWeekly downloads growth on npm14,239downloads / week now7-day growth-14,702 weekly downloads-50.8%30-day growth-4,224 weekly downloads-22.9%90-day growth+818 weekly downloads+6.1%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
vite-plugin-optimize-css-modules weekly downloads growth on npm: -50.8% over 7 days, -22.9% over 30 days, +6.1% over 90 days.
PNG SVG

Ranking history

vite-plugin-optimize-css-modules npm ranking history: currently #836 (by weekly downloads).vite-plugin-optimize-css-modulesnpm ranking · by weekly downloads · Last 90 days#836current rank#200#300#400#500#600#700#800#900Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 17, 2026 – Oct 18, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
vite-plugin-optimize-css-modules npm ranking history: currently #836 (by weekly downloads).
PNG SVG

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 (542)
Recent weekly downloads observations for vite-plugin-optimize-css-modules
Date (UTC)Weekly downloadsChange vs. previous
14,239-4.2K
18,454-275
18,729-5.7K
24,396-5.1K
29,4690
29,469+216
29,253+312
28,941+536
28,405+350
28,055+624
27,431+415
27,016-4.4K
31,415+780
30,635—

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-optimize-css-modules. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.