# madyankin/postcss-modules

PostCSS plugin to use CSS Modules everywhere

Repository: https://github.com/madyankin/postcss-modules
Canonical: https://ross.abutalabs.com/products/postcss-modules
Language: JavaScript
License: MIT
License Family: permissive
Topics: css-modules, postcss-modules
Last push: 2026-07-10T16:45:58+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 91, release rhythm 35, longevity 100
- inputs: {"age_days": 3935, "days_push": 54, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1623, forks 89 (observed 2026-08-28T04:05:12.663085+00:00)

## What it is
A PostCSS plugin that implements CSS Modules, transforming class names into scoped hashed tokens and exporting a JSON map of the original-to-generated class names. It works anywhere PostCSS runs, including server-side rendering and Node scripts via a module customization loader.

## Use cases
- use css modules in server-side rendered apps
- scope css class names to avoid collisions
- import css files in node without a bundler
- export css module class name mappings as
- compose styles across css files
- run css modules in jest or vitest node mode

## When to choose
- you need CSS Modules support outside a bundler, such as SSR or Node scripts
- you want a PostCSS plugin you can wire into a custom build pipeline
- you need control over how exported class mappings are saved via getJSON

## When to avoid
- you use webpack, Vite, or Rollup where built-in CSS Modules support already exists
- you want runtime-in-browser CSS processing rather than build-time transformation

## Facets
- artifact type: plugin
- maturity: stable
- function: css-framework, build-tool, templating
- domain: web-development, frontend, developer-tools
- platform: cross-platform
- tags: css-modules, postcss-plugin, ssr, scoped-css, nodejs

## Member repositories
- madyankin/postcss-modules (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:12.663085+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:48:51.470239+00:00, confidence not recorded.
  - readme: https://github.com/madyankin/postcss-modules (fetched 2026-08-28T04:05:12.663085+00:00, sha 1e47b94667e5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
