
Security News
Feross on Risky Business Weekly Podcast: npm’s Ongoing Supply Chain Attacks
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
webpack-cleanup-plugin-morinted
Advanced tools
This webpack plugin cleans up the extraneous files from the webpack's output path.
Since it runs when the compile process is finished, it is useful when you build on production and you want to remove the assets generated by a previous build.
npm install webpack-cleanup-plugin --save-dev
Beware! This plugins actually delete files. Make sure it's safe for your app
to delete files not generated by webpack. Use the exclude
option if you want to
keep files that are not webpack assets.
Add the plugin to the plugins
array in your webpack's config, e.g.:
{
output: {
path: "/my/output/path"
},
plugins: [
// Remove all the files from /my/output/path that are not generated by the
// the current instance of the webpack compiler
new WebpackCleanupPlugin()
]
}
If you want to keep some files, e.g. a stats.json file generated from some other
plugins, use the exclude
option:
plugins: [
// Remove all but stats.json and important.json
new WebpackCleanupPlugin({
exclude: ["stats.json", "important.js"]
})
]
FAQs
Fork of webpack-cleanup-plugin.
We found that webpack-cleanup-plugin-morinted demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.