Vite plugin to remove/clean build files or folders before building. Version 2.0.1, maintained with sparse releases. Key differentiator: simple, zero-config clean of 'dist' by default with optional custom target files. Lightweight alternative to 'rimraf' or shell commands, integrates directly into Vite's build lifecycle. No extra dependencies.
npm install vite-plugin-cleanVerified import paths — ran on the pinned version, not inferred.
Demonstrates plugin usage with custom targetFiles to remove 'dist' and 'temp' directories before build.
Ensure target files are not needed during dev; consider using 'buildStart' only by wrapping in conditional.
Double-check file paths; test with non-critical directories first.
Use targetFiles: ['dist'] instead.
Run `npm install --save-dev vite-plugin-clean`
Use `import cleanPlugin from 'vite-plugin-clean'` (default import).
Use absolute paths or ensure relative paths are correct from project root.
No dependency data recorded yet.