{"id":21863013,"url":"https://github.com/charpeni/react-native-bundle-scale","last_synced_at":"2025-10-25T06:09:52.947Z","repository":{"id":178389233,"uuid":"320042004","full_name":"charpeni/react-native-bundle-scale","owner":"charpeni","description":"A command-line interface to see how adding packages affects your React Native JavaScript bundle.","archived":false,"fork":false,"pushed_at":"2025-09-17T12:30:58.000Z","size":254,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-23T16:51:33.658Z","etag":null,"topics":["bundle","cost","package","react-native"],"latest_commit_sha":null,"homepage":"","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/charpeni.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":"2020-12-09T18:16:54.000Z","updated_at":"2025-09-17T12:29:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"d284f4da-2620-456e-bf6b-a4ab75b8aa35","html_url":"https://github.com/charpeni/react-native-bundle-scale","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"2907b0f6b423dadb40316283ca23b83773542dd0"},"previous_names":["charpeni/react-native-bundle-scale"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/charpeni/react-native-bundle-scale","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charpeni%2Freact-native-bundle-scale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charpeni%2Freact-native-bundle-scale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charpeni%2Freact-native-bundle-scale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charpeni%2Freact-native-bundle-scale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charpeni","download_url":"https://codeload.github.com/charpeni/react-native-bundle-scale/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charpeni%2Freact-native-bundle-scale/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280912556,"owners_count":26412463,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bundle","cost","package","react-native"],"created_at":"2024-11-28T03:19:23.976Z","updated_at":"2025-10-25T06:09:52.941Z","avatar_url":"https://github.com/charpeni.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg height=\"160\" src=\"https://github.com/user-attachments/assets/8fe0ea16-8c1f-482c-bfbe-4424e68953f0\" alt=\"Library's logo\"\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e\n  React Native Bundle Scale\n\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  A command-line interface to see how adding packages affects your React Native JavaScript bundle.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.org/package/react-native-bundle-scale\"\u003e\n    \u003cimg src=\"https://badge.fury.io/js/react-native-bundle-scale.svg\" alt=\"Current npm package version.\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.org/package/react-native-bundle-scale\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/react-native-bundle-scale\" alt=\"Monthly downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://circleci.com/gh/charpeni/react-native-bundle-scale\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"PRs welcome!\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/charpeni/react-native-bundle-scale/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"React Native Bundle Scale is released under the MIT license.\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003chr /\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/charpeni/react-native-bundle-scale/assets/7189823/ce7ca8ea-8088-4b54-8de9-1e0298106872\"\u003e\n    \u003cimg width=\"800\" alt=\"Library's example\" src=\"https://github.com/charpeni/react-native-bundle-scale/assets/7189823/a155f9a4-bb22-4e67-957d-a75f38a8edc9\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n## Usage\n\nYou can use this CLI to either get the cost of adding packages to a freshly initialized React Native project or based on a `package.json`:\n\n```sh\n# To get the cost of adding `react-native-url-polyfill` to a freshly initialized React Native project\nnpx react-native-bundle-scale react-native-url-polyfill\n\n# To get the cost of adding `react-native-url-polyfill` based on the current `package.json`\nnpx react-native-bundle-scale react-native-url-polyfill --package-json\n```\n\nThe CLI will initialize a new React Native project either untouched or with the dependencies from the `package.json` you provided. It will generate a bundle for the original state, add the packages you provided, generate another bundle, and finally, diff both bundle sizes.\n\n## What's the difference between this and Bundlephobia and co?\n\nDon't get me wrong, Bundlephobia and co. are amazing tools. They will analyze a dependency and its transitive dependencies and will try to determine the cost associated with adding it.\n\nUnfortunately, they aren't always accurate for React Native bundles. They are multiple reasons for that, but the main reasons are that React Native bundles all share the same initial dependencies, so it depends on what React Native packages by default, but it also depends on your current dependencies and their versions.\n\nIn this CLI case, it creates a React Native bundle with the provided packages and then diffs the size of both packages (with/without).\n\n## License\n\nreact-native-bundle-scale is [MIT licensed](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharpeni%2Freact-native-bundle-scale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharpeni%2Freact-native-bundle-scale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharpeni%2Freact-native-bundle-scale/lists"}