Rollup plugin for rm command at build start or end.
$ npm i rollup-plugin-rm -D
import rm from 'rollup-plugin-rm'
export default {
input: 'src/index.js',
output: {
dir: 'output',
format: 'cjs'
},
plugins: [rm('dist', 'buildStart')]
}
Or rm
at the build end hook:
rm('dist/types', 'buildEnd')
MIT copyright © 2024-present alex wei