{"id":26684229,"url":"https://github.com/johnapache/compress-webpack-plugin","last_synced_at":"2026-05-15T12:30:54.237Z","repository":{"id":97358323,"uuid":"284917041","full_name":"JohnApache/compress-webpack-plugin","owner":"JohnApache","description":"webpack 压缩插件 支持 gzip brotli","archived":false,"fork":false,"pushed_at":"2020-08-04T08:49:46.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T18:38:03.727Z","etag":null,"topics":["brotli-compress","gzip-compress","webpack","webpack-compress","webpack-compress-plugin","webpack-plugin"],"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/JohnApache.png","metadata":{"files":{"readme":"README.en_US.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,"zenodo":null}},"created_at":"2020-08-04T08:06:12.000Z","updated_at":"2020-08-04T09:08:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"115d6ce2-ea4b-4f68-a3d7-2d8673ce8008","html_url":"https://github.com/JohnApache/compress-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JohnApache/compress-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnApache%2Fcompress-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnApache%2Fcompress-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnApache%2Fcompress-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnApache%2Fcompress-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnApache","download_url":"https://codeload.github.com/JohnApache/compress-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnApache%2Fcompress-webpack-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["brotli-compress","gzip-compress","webpack","webpack-compress","webpack-compress-plugin","webpack-plugin"],"created_at":"2025-03-26T09:19:22.731Z","updated_at":"2026-05-15T12:30:54.230Z","avatar_url":"https://github.com/JohnApache.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webpack Compress Plugin\n\n\u003e Tips: Personal learning to write webpack plug-ins, not recommended for production environment\n\n- [English](README.en_US.md)\n- [简体中文](README.md)\n\n\u003e Webpack-Compress-Plugin support `gzip` and `brotli` compress.\n\n- [Install](#install)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Questions](#questions)\n- [License](#license)\n\n## Install\n```bash\n$ npm i @dking/webpack-compress-plugin --dev \n$ yarn add @dking/webpack-compress-plugin -D\n```\n\n## Usage\n\n```js\n// webpack.config.js\nconst path = require('path');\nconst CompressPlugin = require('@dking/compress-webpack-plugin');\n\nmodule.exports = {\n  mode: 'development',\n  entry: './src/index.js',\n  output: {\n    filename: 'main.js',\n    path: path.resolve(__dirname, 'dist'),\n  },\n  plugins: [\n    new CompressPlugin({ \n        deleteOriginalAssets: true, \n        algorithm           : 'brotli',\n    })\n  ]\n};\n```\n\n## Configuration\n\n```js\nnew CompressPlugin({ \n    deleteOriginalAssets: false, // Whether to delete the files before compression depends on the situation. The default setting is false\n    algorithm           : 'gzip', // Compression algorithm, the default is gzip\n    test                : /./, // All files are compressed by default\n    threshold           : 1000, // Only resources larger than this value are processed. In bytes\n    minRatio            : 0.8, // Only resources with a compression ratio lower than this value will be processed\n})\n```\n\n## Questions\nPlease open an issue [here](https://github.com/webpack-contrib/compression-webpack-plugin/issues).\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnapache%2Fcompress-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnapache%2Fcompress-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnapache%2Fcompress-webpack-plugin/lists"}