Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
unused-webpack-plugin
Advanced tools
A webpack plugin to find unused modules/source files.
npm i --dev unused-webpack-plugin
const path = require('path');
const UnusedWebpackPlugin = require('unused-webpack-plugin');
module.exports = {
// webpack configuration
plugins: [
...otherPlugins,
new UnusedWebpackPlugin({
// Source directories
directories: [path.join(__dirname, 'src')],
// Exclude patterns
exclude: ['*.test.js'],
// Root directory (optional)
root: __dirname,
}),
],
};
directories
: array of directories where to look for unused source files.exclude
: array of exclude patterns when looking for unused source files.root
: root directory that will be use to display relative paths instead of absolute ones (see below)failOnUnused
: whether or not the build should fail if unused files are found (defaults to false
)useGitIgnore
: whether or not to respect .gitignore
file (defaults to true
)With root
Without root
If you're not using webpack, check out remnants.
FAQs
A webpack plugin to find unused modules/source files
The npm package unused-webpack-plugin receives a total of 28,083 weekly downloads. As such, unused-webpack-plugin popularity was classified as popular.
We found that unused-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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.