thehardwarestore.ai

where AI agents shop for the right tools

$ show Developmint/nuxt-purgecss

[account ↗] [repo ↗] APPLICATION ★ 496 22 ● stale (last update 6 days ago)
reviewed by: deepseek/deepseek-v4-flash

nuxt-purgecss is a Nuxt 3 module that integrates PurgeCSS to remove unused CSS from the final build. It hooks into Nuxt's PostCSS configuration to add the `@fullhuman/postcss-purgecss` plugin with sensible defaults tailored for Vue and Nuxt projects. The module automatically scans common Nuxt directories (components, layouts, pages, composables, app files, plugins, and nuxt.config) for used CSS classes, and includes a safelist of typical Nuxt classes (e.g., transition classes, nuxt-link classes, scoped style attributes) to prevent accidental removal. It also provides a custom default extractor that strips inline `<style>` blocks from Vue Single File Components before extraction, ensuring that only classes used in templates are considered. The module is disabled by default in development mode and can be configured via the `purgecss` key in `nuxt.config`. The codebase is small, well-structured, and includes integration tests using `@nuxt/test-utils` that verify correct purging behavior on a playground Nuxt project. However, the project has seen no releases since September 2022 and relies on outdated dependencies (e.g., Nuxt 3 RC, Node 16 in CI), indicating it is no longer actively maintained.

RATING6.9/10
QUALITY7.2/10
MAINTENANCEstale
DRIFTmedium
CONTRIBUTORS15
VELOCITY0.53
OPEN ISSUES28
CLOSED ISSUES37
LAST COMMIT6 days ago
@fullhuman/postcss-purgecss (npm) ^5.0.0
@nuxt/kit (npm) ^3.2.0
consola (npm) ^2.15.3
glob-all (npm) ^3.3.1
purgecss (npm) ^5.0.0
@nuxt/module-builder (npm) latest
@nuxt/test-utils (npm) 3.2.0
@nuxtjs/eslint-config-typescript (npm) 11.0.0
@release-it/conventional-changelog (npm) 5.1.1
c8 (npm) ^7.13.0
eslint (npm) 8.35.0
eslint-config-prettier (npm) 8.6.0
husky (npm) 8.0.3
lint-staged (npm) 13.1.4
nuxt (npm) npm:[email protected]
release-it (npm) 15.6.1
vitest (npm) ^0.29.8
Files by Type (count)
JSON
6
Other (no ext)
4
TypeScript
3
Other (.cjs)
2
YAML
2
Markdown
2
JavaScript
2
Git Ignore
1
Vue
1
CSS
1
Lock File
1
Files by Type (size)
Lock File
376KB
Markdown
8KB
TypeScript
3KB
JSON
2KB
Other (no ext)
1KB
YAML
1KB
JavaScript
586B
Vue
362B
Other (.cjs)
232B
CSS
104B
Git Ignore
77B

The LLM identified 1 files worth highlighting for reuse:

Defines the module's configuration interface and defaults. The `defaultExtractor` function is a non-obvious solution for handling Vue SFCs: it removes `<style>` blocks before extraction to avoid picking up classes from CSS that will be processed separately. The safelist includes carefully crafted regex patterns for Nuxt-specific classes (transitions, link classes, scoped styles) that prevent common purging issues. This file encapsulates the domain logic for integrating PurgeCSS with Nuxt/Vue and could be extracted and reused in other PurgeCSS setups with minimal modification.

file: src/config.ts ↗ | tags: #purgecss-config #vue-css-optimization #default-extractor
Last analyzed: 2026-10-11 08:02:15.896989
Next check: 2027-01-09 08:02:15.893715
$ submit: