clear-old-hashes-plugin
v1.0.0
Published
A webpack plugin that will clear output folder of old hashed bundles. Intended for a development environment
Maintainers
Readme
clear-old-hashes-plugin
Documentation
Installation
npm install clear-old-hashes-plugin --save-devExample Webpack Config
var ClearOldHashesPlugin = require('clear-old-hashes-plugin');
module.exports = {
entry: {
bundle: './entry.js',
vendor: './vendor.js'
},
output: {
path: path.join(process.cwd(), './dist'),
filename: '[id].bundle.[chunkhash].js'
},
plugins: [
new ClearOldHashesPlugin({delimiter: '.'})
]
}
Usage
new ClearOldHashesPlugin({options})Options Config
{
"delimiter": symbol to separate filename sections ('.' || '-' || anything else...), // [name]-[hash].js or [name].[hash].js etc...
}License MIT License
