# johnagan/clean-webpack-plugin

A webpack plugin to remove your build folder(s) before building

Repository: https://github.com/johnagan/clean-webpack-plugin
Canonical: https://ross.abutalabs.com/products/clean-webpack-plugin
Language: TypeScript
License: MIT
License Family: permissive
Topics: javascript, webpack-plugin, webpack, clean
Archived: true
Last push: 2021-09-01T13:46:08+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4168, "days_push": 1827, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1940, forks 136 (observed 2026-08-28T04:05:57.329646+00:00)

## What it is
A webpack plugin that removes build output folders and stale assets before and after builds. It cleans webpack's output.path directory on each successful rebuild.

## Use cases
- clean dist folder before webpack build
- remove stale webpack assets on rebuild
- delete old build files automatically
- prevent hashed asset files from piling up
- dry-run cleanup of build directory

## When to choose
- you use webpack 4+ and want automatic build folder cleanup
- you need to remove unused hashed assets between rebuilds

## When to avoid
- you use webpack 5, which has built-in output.clean
- you don't use webpack as your bundler

## Facets
- artifact type: plugin
- maturity: maintenance
- function: build-tool, plugin-system, developer-tools
- domain: web-development, frontend, developer-tools
- platform: cli
- tags: webpack, build-cleanup, dist-folder, stale-assets, automation, nodejs, javascript

## Member repositories
- johnagan/clean-webpack-plugin (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:57.329646+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:08:09.526173+00:00, confidence not recorded.
  - readme: https://github.com/johnagan/clean-webpack-plugin (fetched 2026-08-28T04:05:57.329646+00:00, sha f5a92747d5fe)
  - registry_npm: https://registry.npmjs.org/clean-webpack-plugin (fetched 2026-08-29T10:47:45.705079+00:00, sha 56a93d83a82d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
