{"id":20126179,"url":"https://github.com/tomchentw/unused-files-webpack-plugin","last_synced_at":"2025-05-16T08:06:22.415Z","repository":{"id":32479812,"uuid":"36060058","full_name":"tomchentw/unused-files-webpack-plugin","owner":"tomchentw","description":"Glob all files that are not compiled by webpack under webpack's context","archived":false,"fork":false,"pushed_at":"2022-12-07T09:16:08.000Z","size":1163,"stargazers_count":267,"open_issues_count":28,"forks_count":35,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-11T01:47:43.921Z","etag":null,"topics":["glob","unused","webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomchentw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-22T08:06:11.000Z","updated_at":"2025-02-12T19:04:37.000Z","dependencies_parsed_at":"2023-01-14T21:21:05.085Z","dependency_job_id":null,"html_url":"https://github.com/tomchentw/unused-files-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomchentw%2Funused-files-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomchentw%2Funused-files-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomchentw%2Funused-files-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomchentw%2Funused-files-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomchentw","download_url":"https://codeload.github.com/tomchentw/unused-files-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493378,"owners_count":22080126,"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":["glob","unused","webpack","webpack-plugin"],"created_at":"2024-11-13T20:14:07.209Z","updated_at":"2025-05-16T08:06:17.398Z","avatar_url":"https://github.com/tomchentw.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unused-files-webpack-plugin\n\u003e Glob all files that are not compiled by webpack under webpack's context\n\n[![Version][npm-image]][npm-url] [![Travis CI][travis-image]][travis-url] [![Quality][codeclimate-maintainability-image]][codeclimate-maintainability-url] [![Coverage][codeclimate-c-image]][codeclimate-c-url] [![Dependencies][gemnasium-image]][gemnasium-url] [![Gitter][gitter-image]][gitter-url]\n\nInstall with npm:\n\n```bash\nnpm i --save-dev unused-files-webpack-plugin\n```\n\nInstall with yarn:\n\n```bash\nyarn add --dev unused-files-webpack-plugin\n```\n\n## Usage\n\n### `webpack.config.babel.js`\n\n```js\nimport UnusedFilesWebpackPlugin from \"unused-files-webpack-plugin\";\n\nexport default {\n  plugins: [\n    new UnusedFilesWebpackPlugin(options),\n  ],\n};\n```\n\n### `webpack.config.js`\n\n```js\nconst { UnusedFilesWebpackPlugin } = require(\"unused-files-webpack-plugin\");\n\nmodule.exports = {\n  plugins: [\n    new UnusedFilesWebpackPlugin(options),\n  ],\n};\n```\n\n\n## Options\n\n```js\nnew UnusedFilesWebpackPlugin(options)\n```\n\n### options.patterns\n\nThe (array of) pattern(s) to glob all files within the context.\n\n* Default: `[\"**/*.*\"]`\n* Directly pass to [`glob-all(patterns)`](https://github.com/jpillora/node-glob-all#api)\n\n### options.failOnUnused\n\nEmit _error_ instead of _warning_ in webpack compilation result.\n\n* Default: `false`\n* Explicitly set it to `true` to enable this feature\n\n### options.globOptions\n\nThe options object pass to second parameter of `glob-all`.\n\n* Default: `{ignore: \"node_modules/**/*\"}`\n* Directly pass to [`glob-all(pattern, globOptions)`](https://github.com/jpillora/node-glob-all#api), which then pass to [`glob(…, globOptions)`](https://github.com/isaacs/node-glob#options)\n\n#### globOptions.ignore\n\nIgnore pattern for glob. Can be a String or an Array of String.\n\n* Default: `\"node_modules/**/*\"`\n* Pass to: [`options.ignore`](https://github.com/isaacs/node-glob#options)\n\n#### globOptions.cwd\n\nCurrent working directory for glob. If you don't set explicitly, it defaults to the `context` specified by your webpack compiler at runtime.\n\n* Default: `webpackCompiler.context`\n* Pass to: [`options.cwd`](https://github.com/isaacs/node-glob#options)\n* See also: [`context` in webpack](https://webpack.js.org/configuration/entry-context/#context)\n\n\n## Contributing\n\n[![devDependency Status][david-dm-image]][david-dm-url]\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n\n[npm-image]: https://img.shields.io/npm/v/unused-files-webpack-plugin.svg?style=flat-square\n[npm-url]: https://www.npmjs.org/package/unused-files-webpack-plugin\n\n[travis-image]: https://img.shields.io/travis/tomchentw/unused-files-webpack-plugin.svg?style=flat-square\n[travis-url]: https://travis-ci.org/tomchentw/unused-files-webpack-plugin\n[codeclimate-maintainability-image]: https://img.shields.io/codeclimate/maintainability/tomchentw/unused-files-webpack-plugin.svg?style=flat-square\n[codeclimate-maintainability-url]: https://codeclimate.com/github/tomchentw/unused-files-webpack-plugin\n[codeclimate-c-image]: https://img.shields.io/codeclimate/c/tomchentw/unused-files-webpack-plugin.svg?style=flat-square\n[codeclimate-c-url]: https://codeclimate.com/github/tomchentw/unused-files-webpack-plugin\n[gemnasium-image]: https://img.shields.io/gemnasium/tomchentw/unused-files-webpack-plugin.svg?style=flat-square\n[gemnasium-url]: https://gemnasium.com/tomchentw/unused-files-webpack-plugin\n[gitter-image]: https://badges.gitter.im/Join%20Chat.svg\n[gitter-url]: https://gitter.im/tomchentw/unused-files-webpack-plugin?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n[david-dm-image]: https://img.shields.io/david/dev/tomchentw/unused-files-webpack-plugin.svg?style=flat-square\n[david-dm-url]: https://david-dm.org/tomchentw/unused-files-webpack-plugin#info=devDependencies\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomchentw%2Funused-files-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomchentw%2Funused-files-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomchentw%2Funused-files-webpack-plugin/lists"}