{"id":17910500,"url":"https://github.com/matthieulemoine/unused-webpack-plugin","last_synced_at":"2025-04-04T15:10:21.935Z","repository":{"id":25702462,"uuid":"106109711","full_name":"MatthieuLemoine/unused-webpack-plugin","owner":"MatthieuLemoine","description":"A webpack plugin to find unused modules/source files.","archived":false,"fork":false,"pushed_at":"2022-12-09T08:19:33.000Z","size":1133,"stargazers_count":197,"open_issues_count":38,"forks_count":19,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T14:10:01.393Z","etag":null,"topics":["plugin","unused","webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MatthieuLemoine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-07T15:45:38.000Z","updated_at":"2025-03-27T01:09:34.000Z","dependencies_parsed_at":"2022-07-27T05:16:36.770Z","dependency_job_id":null,"html_url":"https://github.com/MatthieuLemoine/unused-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthieuLemoine%2Funused-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthieuLemoine%2Funused-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthieuLemoine%2Funused-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatthieuLemoine%2Funused-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatthieuLemoine","download_url":"https://codeload.github.com/MatthieuLemoine/unused-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198463,"owners_count":20900080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["plugin","unused","webpack"],"created_at":"2024-10-28T19:31:59.875Z","updated_at":"2025-04-04T15:10:21.912Z","avatar_url":"https://github.com/MatthieuLemoine.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UnusedWebpackPlugin [![CircleCI](https://circleci.com/gh/MatthieuLemoine/unused-webpack-plugin.svg?style=svg)](https://circleci.com/gh/MatthieuLemoine/unused-webpack-plugin)\n\nA webpack plugin to find unused modules/source files.\n\n![unused-webpack-plugin](images/with-root.png)\n\n## Install\n\n```\nnpm i --dev unused-webpack-plugin\n```\n\n## Usage\n\n```javascript\nconst path = require('path');\nconst UnusedWebpackPlugin = require('unused-webpack-plugin');\n\nmodule.exports = {\n  // webpack configuration\n  plugins: [\n    ...otherPlugins,\n    new UnusedWebpackPlugin({\n      // Source directories\n      directories: [path.join(__dirname, 'src')],\n      // Exclude patterns\n      exclude: ['*.test.js'],\n      // Root directory (optional)\n      root: __dirname,\n    }),\n  ],\n};\n```\n\n## Options\n\n- `directories` : array of directories where to look for unused source files.\n- `exclude` : array of exclude patterns when looking for unused source files.\n- `root` : root directory that will be use to display relative paths instead of absolute ones (see below)\n- `failOnUnused`: whether or not the build should fail if unused files are found (defaults to `false`)\n- `useGitIgnore`: whether or not to respect `.gitignore` file (defaults to `true`)\n\nWith root\n\n![With root](images/with-root.png)\n\nWithout root\n\n![Without root](images/without-root.png)\n\n## Related\n\nIf you're not using webpack, check out [remnants](https://github.com/MatthieuLemoine/remnants).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthieulemoine%2Funused-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthieulemoine%2Funused-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthieulemoine%2Funused-webpack-plugin/lists"}