2.0.0 • Published 2 years ago

rollup-plugin-cleandir v2.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
2 years ago

rollup-plugin-cleandir

Test npm version

🧹 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.