rollup-plugin-cleandir
v2.0.0
Published
Rollup Plugin for empty output directories.
Downloads
3,528
Readme
rollup-plugin-cleandir
🧹 Rollup plugin to Clean output directories automatically.
Install
$ npm install --save-dev rollup-plugin-cleandir
Usage
In rollup.config.js:
import { cleandir } from "rollup-plugin-cleandir";
export default {
input: ["index.js"],
output: {
dir: "./dist",
format: "es",
},
plugins: [cleandir()],
};
Clean before building.
rollup-plugin-cleandir@v2 runs when renderStart hook by default.
If you want to clean before building(buildStart hook), set output directory path to cleandir
function.
e.g. cleandir("./dist")
This is same of rollup-plugin-cleandir@v1 behavior.