{"id":35474679,"url":"https://github.com/rstackjs/rsbuild-plugin-html-minifier-terser","last_synced_at":"2026-05-28T16:01:15.301Z","repository":{"id":247398195,"uuid":"825600588","full_name":"rstackjs/rsbuild-plugin-html-minifier-terser","owner":"rstackjs","description":"An Rsbuild plugin to use `html-minifier-terser` to minify the HTML outputs.","archived":false,"fork":false,"pushed_at":"2026-05-28T14:00:20.000Z","size":198,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-28T15:21:41.717Z","etag":null,"topics":["rsbuild","rsbuild-plugin","rspack"],"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/rstackjs.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-08T06:50:23.000Z","updated_at":"2026-05-28T14:00:58.000Z","dependencies_parsed_at":"2026-05-12T21:02:48.641Z","dependency_job_id":null,"html_url":"https://github.com/rstackjs/rsbuild-plugin-html-minifier-terser","commit_stats":null,"previous_names":["rspack-contrib/rsbuild-plugin-html-minifier-terser","rstackjs/rsbuild-plugin-html-minifier-terser"],"tags_count":5,"template":false,"template_full_name":"rstackjs/rsbuild-plugin-template","purl":"pkg:github/rstackjs/rsbuild-plugin-html-minifier-terser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-html-minifier-terser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-html-minifier-terser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-html-minifier-terser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-html-minifier-terser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rstackjs","download_url":"https://codeload.github.com/rstackjs/rsbuild-plugin-html-minifier-terser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstackjs%2Frsbuild-plugin-html-minifier-terser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33615490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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":["rsbuild","rsbuild-plugin","rspack"],"created_at":"2026-01-03T12:00:40.055Z","updated_at":"2026-05-28T16:01:15.292Z","avatar_url":"https://github.com/rstackjs.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Rsbuild Plugins"],"readme":"# rsbuild-plugin-html-minifier-terser\n\nAn Rsbuild plugin to use [html-minifier-terser](https://github.com/terser/html-minifier-terser) to minify the HTML outputs.\n\n\u003cp\u003e\n  \u003ca href=\"https://npmjs.com/package/rsbuild-plugin-html-minifier-terser\"\u003e\n   \u003cimg src=\"https://img.shields.io/npm/v/rsbuild-plugin-html-minifier-terser?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"npm version\" /\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"license\" /\u003e\n\u003c/p\u003e\n\n## Usage\n\nInstall:\n\n```bash\nnpm add rsbuild-plugin-html-minifier-terser -D\n```\n\n### Basic\n\nAdd plugin to your `rsbuild.config.ts`, HTML will be minified by default and JS minimization affected by Rsbuild's config.\n\n```ts\n// rsbuild.config.ts\nimport { pluginHtmlMinifierTerser } from 'rsbuild-plugin-html-minifier-terser';\n\nexport default {\n  plugins: [pluginHtmlMinifierTerser()],\n};\n```\n\n### Customize options\n\nThe plugin could accept an parameter of type `HtmlMinifierOptions | ((options: HtmlMinifierOptions) =\u003e HtmlMinifierOptions)`.\n\n1. Passing options to customize the minification, fields listed in the options will override the default options.\n\n   ```ts\n   export default {\n     plugins: [\n       pluginHtmlMinifierTerser({\n         // `minifyCSS` will be set to false\n         minifyCSS: false,\n       }),\n     ],\n   };\n   ```\n\n2. A callback function can be passed to the plugin to customize the minification options based on the default options, and the return value will be used as the final options.\n\n   ```ts\n   export default {\n     plugins: [\n       pluginHtmlMinifierTerser((options) =\u003e {\n         // customize options here\n         return options;\n       }),\n     ],\n   };\n   ```\n\n## License\n\n[MIT](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstackjs%2Frsbuild-plugin-html-minifier-terser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frstackjs%2Frsbuild-plugin-html-minifier-terser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstackjs%2Frsbuild-plugin-html-minifier-terser/lists"}