{"id":24997881,"url":"https://github.com/potatomaster101/webpack-chunk-extract","last_synced_at":"2025-03-29T16:25:09.035Z","repository":{"id":273717911,"uuid":"920652467","full_name":"PotatoMaster101/webpack-chunk-extract","owner":"PotatoMaster101","description":"Tool that searches and extracts the chunk loader in a Webpack site","archived":false,"fork":false,"pushed_at":"2025-03-05T02:47:37.000Z","size":169,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T03:27:41.357Z","etag":null,"topics":["dotnet","webpack","webpack-chunk","webpack-chunk-loader","webpack-tool"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PotatoMaster101.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-22T14:39:03.000Z","updated_at":"2025-03-05T02:47:40.000Z","dependencies_parsed_at":"2025-03-06T09:00:47.367Z","dependency_job_id":null,"html_url":"https://github.com/PotatoMaster101/webpack-chunk-extract","commit_stats":null,"previous_names":["potatomaster101/chunk-search","potatomaster101/webpack-chunk-extract"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotatoMaster101%2Fwebpack-chunk-extract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotatoMaster101%2Fwebpack-chunk-extract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotatoMaster101%2Fwebpack-chunk-extract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotatoMaster101%2Fwebpack-chunk-extract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PotatoMaster101","download_url":"https://codeload.github.com/PotatoMaster101/webpack-chunk-extract/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246209830,"owners_count":20741077,"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":["dotnet","webpack","webpack-chunk","webpack-chunk-loader","webpack-tool"],"created_at":"2025-02-04T17:26:25.490Z","updated_at":"2025-03-29T16:25:09.007Z","avatar_url":"https://github.com/PotatoMaster101.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webpack Chunk Extractor\nA prototype tool that searches and extracts the chunk loader in a Webpack site, along with all the chunk filenames.\n\nThe extractor supports:\n- Chunk loader that uses an object expression (e.g., `{100: 'chunk', 101: 'bbb'}[e] + '.js'`)\n- Chunk loader that uses `if` statements (e.g., `if (100 === e) return 'chunk.js'`)\n- Chunk loader that uses ternary operator (`?:`) (e.g., `100 === e ? 'chunk.js' : ...`)\n- Chunk loader that uses `switch` statement (e.g., `switch (e) { case 100: return 'chunk.js' }`)\n\nFor an overview of how this works read [DOC.md](DOC.md).\n\n## Note\n- This tool requires [Playwright browsers](https://playwright.dev/docs/browsers): `npx playwright@1.50.1 install`\n- This tool only searches for chunk loaders when visiting a Webpack site, any chunk loaders loaded on demand will not be caught\n  - To search more thoroughly, dump all the `.js` files found to a folder run with `-d`\n\n## Usage\n```\nDescription:\n  Webpack Chunk Loader Extractor\n\nUsage:\n  ChunkSearch \u003curl\u003e [options]\n\nArguments:\n  \u003curl\u003e  URL to the site to search for the Webpack chunk loader\n\nOptions:\n  -f, --file      Specifies that the URL is a file path\n  -d, --dir       Specifies that the URL is a directory path\n  -v, --verbose   Specifies verbose output\n  --version       Show version information\n  -?, -h, --help  Show help and usage information\n```\n\n## Example\nSamples JS files can be found under `Samples/`. They are used to test different chunk loaders generated by Webpack.\n\n### Local `.js` File\n```\ndotnet run -c Release --project ChunkSearch -- -f ./Samples/small.js\n```\n\n### Local Directory With `.js` Files\n```\ndotnet run -c Release --project ChunkSearch -- -d ./Samples/\n```\n\n### Webpack Site\n```\ndotnet run -c Release --project ChunkSearch -- https://webpack.js.org/\n```\n\n## Generate Webpack Files\nSample webpack project can be found under `Webpack/`. Generate Webpack files by:\n```\ncd ./Webpack\nnpm install\nnpm run build\n```\nThe generated Webpack files will be under `Webpack/dist/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotatomaster101%2Fwebpack-chunk-extract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotatomaster101%2Fwebpack-chunk-extract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotatomaster101%2Fwebpack-chunk-extract/lists"}