{"id":13774946,"url":"https://github.com/kryops/rollup-plugin-gzip","last_synced_at":"2026-03-15T22:30:40.635Z","repository":{"id":65420781,"uuid":"79429449","full_name":"kryops/rollup-plugin-gzip","owner":"kryops","description":"Compress your Rollup / Vite bundle with Gzip","archived":false,"fork":false,"pushed_at":"2025-06-14T15:49:51.000Z","size":8343,"stargazers_count":57,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T14:40:48.108Z","etag":null,"topics":["compression","gzip","rollup","rollup-plugin","vite","vite-plugin"],"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/kryops.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-01-19T07:55:57.000Z","updated_at":"2025-06-14T15:49:51.000Z","dependencies_parsed_at":"2024-01-13T12:22:56.578Z","dependency_job_id":"af697a23-0aa5-4fff-83e6-d05596ad3f0b","html_url":"https://github.com/kryops/rollup-plugin-gzip","commit_stats":{"total_commits":108,"total_committers":6,"mean_commits":18.0,"dds":"0.16666666666666663","last_synced_commit":"3ddb2d6d214401d1bb4ce88d24c6b059e5932cae"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/kryops/rollup-plugin-gzip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kryops%2Frollup-plugin-gzip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kryops%2Frollup-plugin-gzip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kryops%2Frollup-plugin-gzip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kryops%2Frollup-plugin-gzip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kryops","download_url":"https://codeload.github.com/kryops/rollup-plugin-gzip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kryops%2Frollup-plugin-gzip/sbom","scorecard":{"id":570901,"data":{"date":"2025-08-11","repo":{"name":"github.com/kryops/rollup-plugin-gzip","commit":"d619aabe59f9d04fabf5a4def86d2a8f6c6060ce"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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":"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":"Maintained","score":6,"reason":"7 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.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":"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.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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:15: update your workflow using https://app.stepsecurity.io/secureworkflow/kryops/rollup-plugin-gzip/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/kryops/rollup-plugin-gzip/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/kryops/rollup-plugin-gzip/ci.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party 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":"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":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'main'","Warn: could not determine whether codeowners review is allowed","Warn: no status checks found to merge onto branch 'main'","Warn: PRs are not required to make changes on branch 'main'; or we don't have data to detect it.If you think it might be the latter, make sure to run Scorecard with a PAT or use Repo Rules (that are always public) instead of Branch Protection settings"],"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":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7"],"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-20T16:19:33.571Z","repository_id":65420781,"created_at":"2025-08-20T16:19:33.571Z","updated_at":"2025-08-20T16:19:33.571Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28692035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"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":["compression","gzip","rollup","rollup-plugin","vite","vite-plugin"],"created_at":"2024-08-03T17:01:32.049Z","updated_at":"2026-01-23T12:50:09.442Z","avatar_url":"https://github.com/kryops.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Output"],"readme":"# rollup-plugin-gzip\n\n![ci status](https://github.com/kryops/rollup-plugin-gzip/workflows/CI/badge.svg)\n\nCreates a compressed `.gz` / `.br` artifact for your Rollup / Vite bundle.\n\n**COMPATIBILITY NOTE**: This version is compatible with rollup \u003e= 2.0.0\n\n- For rollup \u003e= 0.60 - 1.x, use version 2.x of this plugin\n- For older versions of rollup, use version 1.x of this plugin\n\n## Installation\n\n```\nnpm install --save-dev rollup-plugin-gzip\n```\n\n## Usage\n\n```js\nimport { rollup } from 'rollup'\nimport gzipPlugin from 'rollup-plugin-gzip'\n\nrollup({\n  input: 'src/index.js',\n  plugins: [gzipPlugin()],\n}).then(/* ... */)\n```\n\n\u003e **NOTE**: This plugin is an ES module. If you import it using `require()`, you have to point to the default export via `require('rollup-plugin-gzip').default`\n\n### Configuration\n\n**filter** `RegExp | (fileName: string) =\u003e boolean`\n\nControl which of the output files to compress.\n\nDefaults to `/\\.(js|mjs|cjs|json|css|html|wasm|svg)$/`\n\n**gzipOptions** `object`\n\nGZIP compression options, see https://nodejs.org/api/zlib.html#zlib_class_options\n\n**minSize** `number`\n\nSpecified the minimum size in Bytes for a file to get compressed. Files that are smaller than this threshold will not be compressed. This does not apply to the files specified through `additionalFiles`!\n\n**additionalFiles** `string[]`\n\nThis option allows you to compress additional files outside of the main rollup bundling process.\n\n**additionalFilesDelay** `number`\n\nThis options sets a delay (ms) before the plugin compresses the files specified through `additionalFiles`.\n\nDefaults to `0` for Rollup \u003e= 2.0.0, `2000` for older versions of Rollup\n\n**customCompression** `(content: string | Buffer) =\u003e string | Buffer | Promise\u003cstring | Buffer\u003e`\n\nSet a custom compression algorithm. The function can either return the compressed contents synchronously, or otherwise return a promise for asynchronous processing.\n\n**fileName** `string | (fileName: string) =\u003e string`\n\nSet a custom file name convention for the compressed files. Can be a suffix string or a function returning the file name.\n\nDefaults to `\".gz\"`\n\n## Examples\n\n\u003e NOTE: These examples use Rollup's JavaScript API. For Rollup configuration file examples, check out the `/examples` directory.\n\n### Brotli Compression\n\nSince Node 11.7.0 you can use Node's built-in Brotli compression:\n\n```ts\nimport { brotliCompress } from 'zlib'\nimport { promisify } from 'util'\nimport { rollup } from 'rollup'\nimport gzipPlugin from 'rollup-plugin-gzip'\n\nconst brotliPromise = promisify(brotliCompress)\n\nrollup({\n  input: 'src/index.js',\n  plugins: [\n    gzipPlugin({\n      customCompression: content =\u003e brotliPromise(Buffer.from(content)),\n      fileName: '.br',\n    }),\n  ],\n}).then(/* ... */)\n```\n\nFor Node \u003c 11.7.0 you need the external [`brotli`](https://www.npmjs.com/package/brotli) module:\n\n```ts\nimport { compress } from 'brotli'\nimport { rollup } from 'rollup'\nimport gzipPlugin from 'rollup-plugin-gzip'\n\nrollup({\n  input: 'src/index.js',\n  plugins: [\n    gzipPlugin({\n      customCompression: content =\u003e compress(Buffer.from(content)),\n      fileName: '.br',\n    }),\n  ],\n}).then(/* ... */)\n```\n\n### Zopfli Compression\n\nZopfli support is available through several different external packages, each of which comes with advantages and disadvantages:\n\n- [`node-zopfli`](https://www.npmjs.com/package/node-zopfli) (or [`node-zopfli-es`](https://www.npmjs.com/package/node-zopfli-es)) - native version, longer installation time, might require build tooling\n\n```ts\nimport { gzipSync } from 'node-zopfli'\nimport { rollup } from 'rollup'\nimport gzipPlugin from 'rollup-plugin-gzip'\n\nrollup({\n  input: 'src/index.js',\n  plugins: [\n    gzipPlugin({\n      customCompression: content =\u003e gzipSync(Buffer.from(content)),\n    }),\n  ],\n}).then(/* ... */)\n```\n\n- [`@gfx/zopfli`](https://www.npmjs.com/package/@gfx/zopfli) - WebAssembly version, faster installation, slower compression\n\n```ts\nimport { gzipAsync } from '@gfx/zopfli'\nimport { rollup } from 'rollup'\nimport gzipPlugin from 'rollup-plugin-gzip'\n\nrollup({\n  input: 'src/index.js',\n  plugins: [\n    gzipPlugin({\n      customCompression: content =\u003e\n        gzipAsync(Buffer.from(content), { numiterations: 15 }),\n    }),\n  ],\n}).then(/* ... */)\n```\n\n### Compressing into multiple formats\n\nTo support compressing your bundle into multiple different formats, you can add this plugin multiple times with different configurations:\n\n```ts\nimport { brotliCompress } from 'zlib'\nimport { promisify } from 'util'\nimport { rollup } from 'rollup'\nimport gzipPlugin from 'rollup-plugin-gzip'\n\nconst brotliPromise = promisify(brotliCompress)\n\nrollup({\n  input: 'src/index.js',\n  plugins: [\n    // GZIP compression as .gz files\n    gzipPlugin(),\n    // Brotil compression as .br files\n    gzipPlugin({\n      customCompression: content =\u003e brotliPromise(Buffer.from(content)),\n      fileName: '.br',\n    }),\n  ],\n}).then(/* ... */)\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkryops%2Frollup-plugin-gzip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkryops%2Frollup-plugin-gzip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkryops%2Frollup-plugin-gzip/lists"}