Automatically removes previous chunk output files if the filename is not same as the new output file name.
Last updated 3 years ago by aikar .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install webpack-auto-clean-build-plugin 
SYNC missed versions from official npm registry.


Automatically remove old assets after each build in webpack watch mode

If you use webpack in watch mode (not dev server), and use hashes in your output file name, then your build folder will quickly rack up versions of every one of your output files.

This plugin makes it so that when a new chunk is generated with a different file name, the previous file name is auto removed.

This makes your project behave very closely to webpack-dev-server, but with writing files to disk, which is much friendlier when used with other web servers.

Does not handle initial clean

This plugin does not handle the initial clean. You should still use something like CleanWebpackPlugin for that.


var AutoCleanBuildPlugin = require('webpack-auto-clean-build-plugin');

then in

plugins: [ new AutoCleanBuildPlugin() ]

Current Tags

  • 1.0.4                                ...           latest (3 years ago)

5 Versions

  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 5
Dependencies (0)
Dev Dependencies (0)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |