clean-build-on-watch-webpack-plugin
Version:
This WebPack plugin removes old files from the build folder on each rebuild caused by `--watch`. To make use of this tiny plugin just install the plugin and then add it to your `webpack.config.js`:
16 lines (14 loc) • 544 B
Markdown
This WebPack plugin removes old files from the build folder on each rebuild caused by `--watch`. To make use of this tiny plugin just install the plugin and then add it to your `webpack.config.js`:
```sh
npm i clean-build-on-watch-webpack-plugin --dev
yarn add clean-build-on-watch-webpack-plugin -D
```
```javascript
const CleanBuildOnWatchPlugin = require('clean-build-on-watch-webpack-plugin')
plugins: [
new CleanBuildOnWatchPlugin() // all you need ;)
]
```