Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cleandir-webpack-plugin
Advanced tools
This plugin allows you to delete files/directories before or after bundle compilation.
Comparing to most popular cleanup plugin, cleandir-webpack-plugin
provides you with ability to run plugin after files was written to output directory and ability to exclude files with glob patterns.
npm i --save cleandir-webpack-plugin
// webpack.conf.js
const CleanDirWebpackPlugin = require("cleandir-webpack-plugin");
module.exports = {
plugins:[
new CleanDirWebpackPlugin(paths [, options])
]
}
Paths can be a valuable string or an array of strings.
Each string should be a valid glob pattern (node-glob is used under the hood).
const options = {
// The momen when cleanup will be triggered, before or after emitting assets to output dir.
// This way you will be able to remove redundant files generated by webpack
//
// Variants: "before", "after"
// Default: "before"
stage: "before",
// Same as paths parameter, but files and direcroties matching given globs wont be deleted
//
// Default: []
exclude: [],
// If true writes result of each glob processing
//
// Default: true
verbose: true,
// If true, will not generate any console output (excepting error)
//
// Default: false
silent: false,
// If true, will only emulate deletion (will not remove files)
//
// Default: false
dryRun: false,
// Allow plugin to clean paths outside of given root path
//
// Default: false
allowExternal: false,
// Path that will be treated as relative root for globs
//
// Default: path.dirname(module.parent.filename)
root: path.dirname(module.parent.filename),
}
FAQs
cleandir-webpack-plugin <a href="https://www
We found that cleandir-webpack-plugin 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.