{"id":44480685,"url":"https://github.com/smikula/webpack-bundle-diff","last_synced_at":"2026-02-12T23:19:50.543Z","repository":{"id":34033875,"uuid":"157936003","full_name":"smikula/webpack-bundle-diff","owner":"smikula","description":"Understand changes in webpack bundle size","archived":false,"fork":false,"pushed_at":"2025-05-15T14:46:06.000Z","size":535,"stargazers_count":49,"open_issues_count":8,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-24T02:43:59.672Z","etag":null,"topics":["hacktoberfest","webpack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/smikula.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-11-17T00:25:56.000Z","updated_at":"2025-06-29T19:44:25.000Z","dependencies_parsed_at":"2024-06-18T19:52:07.813Z","dependency_job_id":"045089fe-faad-41f0-a06d-5a48bb10b2a9","html_url":"https://github.com/smikula/webpack-bundle-diff","commit_stats":{"total_commits":87,"total_committers":7,"mean_commits":"12.428571428571429","dds":"0.27586206896551724","last_synced_commit":"b87f5cdae318a63c402d7c78a5c2f954fd16395c"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/smikula/webpack-bundle-diff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smikula%2Fwebpack-bundle-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smikula%2Fwebpack-bundle-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smikula%2Fwebpack-bundle-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smikula%2Fwebpack-bundle-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smikula","download_url":"https://codeload.github.com/smikula/webpack-bundle-diff/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smikula%2Fwebpack-bundle-diff/sbom","scorecard":{"id":833392,"data":{"date":"2025-08-11","repo":{"name":"github.com/smikula/webpack-bundle-diff","commit":"87efe4b82db966536dee0289a5054d0ca297c4a8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":3,"reason":"Found 6/20 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/smikula/webpack-bundle-diff/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/smikula/webpack-bundle-diff/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/smikula/webpack-bundle-diff/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/smikula/webpack-bundle-diff/publish.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yml:7"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T18:20:25.899Z","repository_id":34033875,"created_at":"2025-08-23T18:20:25.899Z","updated_at":"2025-08-23T18:20:25.899Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29386087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T22:07:52.078Z","status":"ssl_error","status_checked_at":"2026-02-12T22:07:49.026Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["hacktoberfest","webpack"],"created_at":"2026-02-12T23:19:46.640Z","updated_at":"2026-02-12T23:19:50.536Z","avatar_url":"https://github.com/smikula.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webpack-bundle-diff\n\nWebpack-bundle-diff is a tool for understanding changes to your webpack bundles.  Because a single import can cause a whole tree of downstream dependencies to get pulled into a bundle, it is possible for a seemingly innocuous change to have a large effect on your bundle size.  And when some module *does* get unexpectedly included in your bundle, it can be hard to understand specifically what code change caused it.  By comparing the webpack stats from before and after a change, webpack-bundle-diff helps you understand the change's precise impact.\n\nwebpack | webpack-bundle-diff\n--------|--------------------\n5.x.x   | \u003e=1.0.0\n4.x.x   |  \u003c1.0.0\n\n\n## Getting started\n\n1. Install: `npm install -g webpack-bundle-diff`\n2. Produce webpack stats files: `webpack --json \u003e stats.json`\n3. Diff: `wbd diff stats1.json stats2.json -o diff.json`\n4. Report: `wbd report diff.json -o report.md`\n\n## Named chunk groups\n\nDiff information is only reported for **named chunk groups**.  Be sure to provide a name for every entry point or code split point that you want analyzed.  For example, to configure to entry points named `home` and `about` your webpack config might look like:\n\n```typescript\n{\n    entry: {\n        home: \"./home.js\",\n        about: \"./about.js\"\n    }\n}\n```\n\nTo provide a name for a dynamically imported bundle, include the `webpackChunkName` magic comment:\n\n```typescript\nimport(/* webpackChunkName: \"lodash\" */ 'lodash');\n```\n\n## Commands\n\n### **wbd data \\\u003cstats file\\\u003e -o \\\u003coutput file\\\u003e**\n\nGenerates a bundle data JSON file that can be passed to `wbd diff`.  Webpack stats files can be huge, with lots of redundant or unnecessary information.  A bundle data file contains just the information needed for webpack-bundle-diff to do its work at a tiny fraction of the size.  While you can work with webpack stats files directly, you may find it preferable to store bundle data files for the reduced read/write time and space requirements.\n\n### **wbd diff \\\u003cbaseline stats file\\\u003e \\\u003ccomparison stats file\\\u003e -o \\\u003coutput file\\\u003e**\n\nGenerates a JSON file containing detailed information about the diff.  The provided stats files can be the raw webpack stats or bundle data files produced with `wbd data`.\n\n### **wbd report \\\u003cdiff file\\\u003e -o \\\u003coutput file\\\u003e**\n\nProduces a human-readable summary of the provided diff in markdown format.\n\n## API\n\nWebpack-bundle-diff can also be run programmatically via the API:\n\n```typescript\nimport { diff, generateReport } from 'webpack-bundle-diff';\n\nlet diff = diff(stats1, stats2);\nlet report = generateReport(diff);\n```\n\n## Understanding the bundle diff report\n\nIn order to make sense of the bundle diff, you need to understand webpack's concept of a *chunk group*.  Every entry point or code split point defines a chunk group, which is effectively the set of JavaScript that needs to be evaluated when that code point is loaded.  (Chunk groups can be *named*, either by using named entry points or supplying a magic comment inside a dynamic import.)  A chunk group may consist of multiple JS files, so the \"size\" of a chunk group is considered the sum of its JS file sizes.  (Some JS files may be shared between chunk groups, so it is not always necessary to load the full amount when loading a chunk group.)\n\nThe diff report has an entry for each named chunk group, excluding those that have no changes.  The size delta for that chunk group is reported in the heading, followed by a table with details about what modules changes in that chunk group.\n\n\u003e **main (+1,284 bytes)**\n\u003e\n\u003e || Module | Count | Size |\n\u003e |-|-|-|-|\n\u003e |+|./A.js|6|+2,341|\n\u003e |+|./B.js|8|+3,229|\n\u003e |-|./C.js|3|-872|\n\u003e |△|./D.js||+437|\n\u003e |△|*5 modules with minor changes*| |+36|\n\n* The first column of the table indicates whether modules were added (+), removed (-), or changed (△).  Modules with only minor changes (possibly due to internal webpack heuristics) are aggregated together in the last row of the table.\n* One module may cause a whole subgraph of dependencies to get included in the bundle.  The *Count* indicates how many modules were included due to this module.\n* *Size* is the total change in size due to this module and any dependencies it brings in.\n\nNote that the size delta for the chunk group as a whole does not correspond directly to the sizes reported in the table.  The delta reported for the chunk group is based on the final size on disk, possibly including minification.  (Individual module sizes are pre-minification.)  Additionally, the numbers in the table may account for overlapping modules.  For example, in the example above A.js brings in 6 modules and B.js brings in 8 modules; but some of those modules may be shared between them and thus counted twice.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmikula%2Fwebpack-bundle-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmikula%2Fwebpack-bundle-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmikula%2Fwebpack-bundle-diff/lists"}