A webpack plugin to remove/clean no longer used assets files from previous bundles
const CleanObsoleteAssets = require('clean-obsolete-assets-webpack-plugin');
// webpack config
{
plugins: [
new CleanObsoleteAssets({statsFilePath: 'path-to-stats-file.json'})
]
}