Skip to content
PluginStats

vite-plugin-purgecss weekly downloads statistics

By colecrouter · npm · Vite plugins

PurgeCSS plugin for Vite

View on npm Fresh · Dec 6, 2026

vite-plugin-purgecss has 15,688 recorded weekly downloads on npm, a decrease of 14.3% over the past 30 days, ranking #1124 of 3,247 tracked listings.

Weekly downloads
15,688
Official API · Dec 5, 2026
7-day growth
-7.1%
-1.2K weekly downloads
30-day growth
-14.3%
-2.6K weekly downloads
90-day growth
+43.1%
+4.7K weekly downloads
Rank
#1124
▼ 40 in 7 days

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

npm i vite-plugin-purgecss

Usage

Configuration

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

import htmlPurge from 'vite-plugin-purgecss'

export default {
    plugins: [
        htmlPurge({ ...options }),
    ]
}
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:

safelist: [ /popover/ ]

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: 15,688 weekly downloads as of Dec 5, 2026, +43.1% over 90 days.vite-plugin-purgecssWeekly downloads on npm · Last 90 days15,688downloads / week+43.1% over 90 days05K10K15K20KSep 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-purgecss weekly downloads on npm, last 90 days: 15,688 weekly downloads as of Dec 5, 2026, +43.1% over 90 days.

7/30/90-day growth

vite-plugin-purgecss weekly downloads growth on npm: -7.1% over 7 days, -14.3% over 30 days, +43.1% over 90 days.vite-plugin-purgecssWeekly downloads growth on npm15,688downloads / week now7-day growth-1,202 weekly downloads-7.1%30-day growth-2,622 weekly downloads-14.3%90-day growth+4,728 weekly downloads+43.1%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-purgecss weekly downloads growth on npm: -7.1% over 7 days, -14.3% over 30 days, +43.1% over 90 days.

Ranking history

vite-plugin-purgecss npm ranking history: currently #1124 (by weekly downloads).vite-plugin-purgecssnpm ranking · by weekly downloads · Last 90 days#1124current rank#200#400#600#800#1000#1200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-purgecss npm ranking history: currently #1124 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 57, #4 (overall #1,124)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 10, #15 (overall #195)
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 (591)
Recent weekly downloads observations for vite-plugin-purgecss
Date (UTC)Weekly downloadsChange vs. previous
15,688-381
16,069+746
15,323+471
14,852-1.4K
16,212+415
15,797-534
16,331-559
16,890+477
16,413+719
15,694-192
15,886+317
15,569-721
16,290+395
15,895—

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