webpack-clean-obsolete-chunks
A webpack plugin to remove obsolete chunk files in webpack watch mode. Especially useful when use hashes in output file names.
Installation
Via yarn:yarn add webpack-clean-obsolete-chunks --dev
or via npm:
npm install webpack-clean-obsolete-chunks --save-dev
Usage
Just add this plugin as usual.// webpack.config.js
var CleanObsoleteChunks = require('webpack-clean-obsolete-chunks');
module.exports = {
// ...
plugins: [
new CleanObsoleteChunks(options)
]
// ...
};
Options
{
// Write logs to console.
// Default: true
verbose: true,
// Clean obsolete chunks of webpack child compilations.
// Default: false
deep: true
}
NOTE: {deep: true}
option will work only if all descendent
compilations of the initial compilation have unique names