JSPM

unreferenced-files-webpack-plugin

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q49080F
  • License MIT

A Webpack plugin to detect and optionally delete unused (unreferenced) files in your project.

Package Exports

  • unreferenced-files-webpack-plugin
  • unreferenced-files-webpack-plugin/lib/UnreferencedFilesPlugin.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (unreferenced-files-webpack-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

unreferenced-files-webpack-plugin

A Webpack plugin and CLI tool to detect (and optionally delete) files that are not referenced by your Webpack build.

🔧 Installation

npm install --save-dev unreferenced-files-webpack-plugin

🧩 Usage in Webpack

const UnreferencedFilesPlugin = require('unreferenced-files-webpack-plugin');

module.exports = {
  plugins: [
    new UnreferencedFilesPlugin({
      root: './src',
      output: 'unreferenced-files.log',
      outputJson: true,
      autoDelete: false,
      extensions: ['.js', '.vue', '.css', '.png']
    })
  ]
};

🖥️ Usage via CLI

node ./bin/cli.js --root ./src --extensions .js,.vue,.png --json --delete

⚠️ Warning

Use --delete carefully — files will be removed from disk!

📄 License

MIT