Skip to content

Latest commit

 

History

History

rollup-plugin-empty

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

rollup-plugin-empty

npm package

A rollup plugin for emptying dir or deleting files.

NPM version NPM Downloads

Installation

npm install rollup-plugin-empty --save-dev

Usage

rollup.config.js

generate chunks

const empty = require('rollup-plugin-empty');
const match = require('rollup-plugin-match');

module.exports = {
  input: 'src/*.js',
  plugins: [
    empty({
      silent: false,
      dir: 'dist/es'
    }),
    match()
  ],
  output: {
    dir: 'dist/es',
    format: 'es'
  }
};

Options

  • file String|Array delete files if matches
  • dir String|Array empty dir if matches
  • silent Boolean show info after deleting
  • glob see the fast-glob options