{"id":15132152,"url":"https://github.com/googlechromelabs/size-plugin","last_synced_at":"2025-05-13T19:17:35.412Z","repository":{"id":45213291,"uuid":"146022673","full_name":"GoogleChromeLabs/size-plugin","owner":"GoogleChromeLabs","description":"Track compressed Webpack asset sizes over time.","archived":false,"fork":false,"pushed_at":"2025-03-08T03:15:00.000Z","size":2927,"stargazers_count":1672,"open_issues_count":26,"forks_count":41,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-05-06T13:59:34.764Z","etag":null,"topics":["bundlesize","performance-budget","webpack","webpack-assets","webpack-plugin"],"latest_commit_sha":null,"homepage":"https://npm.im/size-plugin","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoogleChromeLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-08-24T17:48:27.000Z","updated_at":"2025-04-27T05:21:15.000Z","dependencies_parsed_at":"2024-02-04T16:20:22.602Z","dependency_job_id":"eb07ca0e-14ba-4d41-b41a-2a53579f56e8","html_url":"https://github.com/GoogleChromeLabs/size-plugin","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Fsize-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Fsize-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Fsize-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Fsize-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleChromeLabs","download_url":"https://codeload.github.com/GoogleChromeLabs/size-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010830,"owners_count":21999004,"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":["bundlesize","performance-budget","webpack","webpack-assets","webpack-plugin"],"created_at":"2024-09-26T04:04:15.776Z","updated_at":"2025-05-13T19:17:35.383Z","avatar_url":"https://github.com/GoogleChromeLabs.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e\n    size-plugin\n    \u003ca href=\"https://www.npmjs.org/package/size-plugin\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/size-plugin.svg?style=flat\" alt=\"npm\"\u003e\u003c/a\u003e\n  \u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Prints the gzipped sizes of your webpack assets and the changes since the last build.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://i.imgur.com/3bWBrJm.png\" width=\"602\" alt=\"size-plugin\"\u003e\n\u003c/p\u003e\n\n\u003e 🙋 Using Rollup? Check out the [rollup-plugin-size](https://github.com/luwes/rollup-plugin-size) port.\n\n## Installation\n\nInstall `size-plugin` as a development dependency using npm:\n\n```sh\nnpm i -D size-plugin\n```\n\n* * *\n\n## Usage\n\nAdd an instance of the plugin to your webpack configuration:\n\n```diff\n// webpack.config.js\n+ const SizePlugin = require('size-plugin');\n\nmodule.exports = {\n  plugins: [\n+    new SizePlugin()\n  ]\n}\n```\n\n* * *\n\n## Options\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n-   [SizePlugin](#sizeplugin)\n    -   [Parameters](#parameters)\n-   [Item](#item)\n    -   [Properties](#properties)\n-   [Data](#data)\n    -   [Properties](#properties-1)\n\n### SizePlugin\n\n`new SizePlugin(options)`\n\n#### Parameters\n\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n    -   `options.pattern` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** minimatch pattern of files to track\n    -   `options.exclude` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** minimatch pattern of files NOT to track\n    -   `options.filename` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** file name to save filesizes to disk\n    -   `options.publish` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** option to publish filesizes to size-plugin-store\n    -   `options.writeFile` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** option to save filesizes to disk\n    -   `options.stripHash` **[function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** custom function to remove/normalize hashed filenames for comparison\n\n### Item\n\n#### Properties\n\n-   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Filename of the item\n-   `sizeBefore` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Previous size, in kilobytes\n-   `size` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Current size, in kilobytes\n-   `sizeText` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Formatted current size\n-   `delta` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Difference from previous size, in kilobytes\n-   `deltaText` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Formatted size delta\n-   `msg` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Full item's default message\n-   `color` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The item's default CLI color\n\n### Data\n\n#### Properties\n\n-   `sizes` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Item](#item)\u003e** List of file size items\n-   `output` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Current buffered output\n\n## License\n\n[Apache 2.0](LICENSE)\n\nThis is not an official Google product.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglechromelabs%2Fsize-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglechromelabs%2Fsize-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglechromelabs%2Fsize-plugin/lists"}