npm install rollup-plugin-clear-f --save-dev
// rollup.config.js
import fRollupClear from 'rollup-plugin-clear-f';
export default {
input: './src/index.js',
output: {
file: './dist/index.js',
format: 'es'
},
plugins: [
fRollupClear({ outputDir: 'dist' }),
//...
]
};