Skip to content
PluginStats

vite-plugin-purgecss weekly downloads statistics

By colecrouter · npm · Vite plugins

PurgeCSS plugin for Vite

View on npm Stale · Oct 17, 2026

vite-plugin-purgecss has 9,870 recorded weekly downloads on npm, a decrease of 15.7% over the past 30 days, ranking #909 of 2,256 tracked listings.

Weekly downloads
9,870
Official API · Oct 17, 2026
7-day growth
-39.0%
-6.3K weekly downloads
30-day growth
-15.7%
-1.8K weekly downloads
90-day growth
-17.8%
-2.1K weekly downloads
Rank
#909
Among tracked npm listings

About vite-plugin-purgecss

Fork of vite-plugin-html-purgecss

vite-plugin-purgecss

This Vite plugin automatically removes unused CSS based on HTML & JS output using PurgeCSS.

• Lightweight install and runtime environment •

Install

npm

Usage

Configuration

Use plugin in your Vite config (vite.config.ts)

Usage with Javascript and non-HTML frameworks

When using frameworks that don't export to HTML (or settings styles via JS), PurgeCSS typically doesn't find anything. To fix this, I've hardcoded the plugin to feed JS code into PurgeCSS (instead of just HTML) to scan for any inlined CSS strings.

This isn't a perfect solution, as it doesn't catch explicit style changes (x.style.color = 'red';). This could potentially be resolved with FullHuman/purgecss-from-js, but it uses CJS which is incompatible with Vite. A better solution might present itself later on.

That being said, this solution should work with most frameworks. It should even work better than a normal PurgeCSS CLI pass. I tested with SvelteKit with @sveltejs/adapter-cloudflare, and it worked flawlessly.

Options

Optionally supply a UserDefinedOptions as you would with PurgeCSS.

If some of your CSS classes aren't making it to the final output, try adding them to safelist in the options object.

An example of this would be Popovers in Bootstrap. Sometimes, the arrow on popovers won't be picked up by PurgeCSS, so I might set:

to manually whitelist all Popover related classes.

Description from the npm listing.

  • vite
  • vite-plugin
  • purgecss

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-purgecss weekly downloads on npm, last 90 days: 9,870 weekly downloads as of Oct 17, 2026, -17.8% over 90 days.vite-plugin-purgecssWeekly downloads on npm · Last 90 days9,870downloads / week-17.8% over 90 days6K8K10K12K14K16K18KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 17, 2026 · 88 observations · Updated Oc…pluginstats.com
vite-plugin-purgecss weekly downloads on npm, last 90 days: 9,870 weekly downloads as of Oct 17, 2026, -17.8% over 90 days.

7/30/90-day growth

vite-plugin-purgecss weekly downloads growth on npm: -39.0% over 7 days, -15.7% over 30 days, -17.8% over 90 days.vite-plugin-purgecssWeekly downloads growth on npm9,870downloads / week now7-day growth-6,305 weekly downloads-39.0%30-day growth-1,835 weekly downloads-15.7%90-day growth-2,137 weekly downloads-17.8%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
vite-plugin-purgecss weekly downloads growth on npm: -39.0% over 7 days, -15.7% over 30 days, -17.8% over 90 days.

Ranking history

vite-plugin-purgecss npm ranking history: currently #909 (by weekly downloads).vite-plugin-purgecssnpm ranking · by weekly downloads · Last 90 days#909current rank#300#400#500#600#700#800#900#1000Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 17, 2026 – Oct 19, 2026 · 3 observations · Updated Oct 17, 2026pluginstats.com
vite-plugin-purgecss npm ranking history: currently #909 (by weekly downloads).

Listing placement

All npm2,256 listings · 113 pages · 1,129 shown · page 46, #9 (overall #909)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins250 listings · 13 pages · page 8, #13 (overall #153)
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 (542)
Recent weekly downloads observations for vite-plugin-purgecss
Date (UTC)Weekly downloadsChange vs. previous
9,870-1.7K
11,541+618
10,923-2.6K
13,486-3.5K
16,9570
16,957+291
16,666+491
16,175+635
15,540+1.4K
14,162+79
14,083+1K
13,037-2.5K
15,574+977
14,597—

Similar npm Vite plugins plugins

All 20 vite-plugin-purgecss alternatives

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-purgecss. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.