{"id":13682656,"url":"https://github.com/latentflip/webpack-unused","last_synced_at":"2025-04-12T18:14:37.424Z","repository":{"id":37663914,"uuid":"67029846","full_name":"latentflip/webpack-unused","owner":"latentflip","description":"Check your frontend code for files/assets that are no longer used.","archived":false,"fork":false,"pushed_at":"2020-01-16T10:45:10.000Z","size":317,"stargazers_count":148,"open_issues_count":5,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T18:14:12.209Z","etag":null,"topics":["frontend","webpack"],"latest_commit_sha":null,"homepage":"","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/latentflip.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":"2016-08-31T11:01:43.000Z","updated_at":"2025-03-27T19:32:09.000Z","dependencies_parsed_at":"2022-09-09T02:33:43.965Z","dependency_job_id":null,"html_url":"https://github.com/latentflip/webpack-unused","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latentflip%2Fwebpack-unused","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latentflip%2Fwebpack-unused/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latentflip%2Fwebpack-unused/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latentflip%2Fwebpack-unused/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/latentflip","download_url":"https://codeload.github.com/latentflip/webpack-unused/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610336,"owners_count":21132920,"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":["frontend","webpack"],"created_at":"2024-08-02T13:01:50.724Z","updated_at":"2025-04-12T18:14:37.385Z","avatar_url":"https://github.com/latentflip.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# webpack-unused\n\nCheck your frontend code for files/assets that are no longer used.\n\nUses the output of `webpack --json` to see which files are actually used in your bundle,\nand lists files which haven't been required.\n\n## Usage:\n\n```bash\n# install webpack-unused\nnpm install -g webpack-unused\n\n# run webpack using your normal webpack config etc\n# with the --json switch to output the stats.json, and pipe to webpack-unused\n# unused files in the cwd will be listed\nwebpack --json | webpack-unused\n\n# if your source code is in a directory, like src/ pass that as a flag:\nwebpack --json | webpack-unused -s src\n```\n\n## Notes/Caveats:\n\n* this doesn't check for any unused npm modules etc that you have installed (`node_modules` is ignored)\n* webpack-unused will detect non-js files that are required via loaders etc, however any requires that happen outside of webpack's knowledge may be incorrectly reported as unused, for example:\n    * css-preprocessor imports, for example `less`'s `@import` happens outside the webpack flow, so files which are only required via `@import` will report as unused, even if they are\n* it looks like currently files that would appear in your output from using webpack's `NormalModuleReplacementPlugin` don't appear in webpack's `--json` output, and so will be incorrectly reported as unused, while the original may be incorrectly reported as used. [issue #1](https://github.com/latentflip/webpack-unused/issues/1)\n* ideally, you'll have all your frontend code in a `src/` directory or similar so that you can use the `-s` flag, if not, any non-frontend code in cwd will be reported as unused\n\n## Related\n\n- [jspm-unused](https://github.com/oligot/jspm-unused) - Find unused files in a Jspm project\n\n## Contributing, etc\n\nThis is just a first stab, and I'm publishing it because I constantly look for/rewrite code to achieve this. PRs/Suggestions for improvements very welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatentflip%2Fwebpack-unused","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flatentflip%2Fwebpack-unused","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatentflip%2Fwebpack-unused/lists"}