rehype-minify provides plugins to minify HTML, including a preset (rehype-preset-minify) with good and safe default settings. It is useful if you already process HTML with rehype (and possibly remark) and want smaller HTML output.
Project status
- The repo appears largely quiet since its last upstream push on 2025-02-19 (about 16 months ago relative to 2026-06-09), so it does not look actively maintained right now.
- Update cadence is irregular, with notable activity clustered around 2024-09 and 2025-02, and older changes going back to 2023. This suggests maintenance in bursts rather than continuous iteration.
AI summary generated
Recent updates
rehype-minify-enumerated-attribute@5.0.2
Release notes for rehype-minify-enumerated-attribute@5.0.2 only mention updating the `property-information` dependency. The code diff shows additional dependency bumps (some major), doc-only link formatting changes, and a build pipeline logic change in `script/pipeline-root.js` that can alter generated output.
Breaking7.0.1
Release 7.0.1 is described as a patch release across the monorepo packages, focusing on adding license files and improving TypeScript type output (refactor to use `@import`s, add declaration maps). No functional or API behavior changes are mentioned in the release notes.
rehype-minify-whitespace@6.0.1
rehype-minify-whitespace was released as version 6.0.1. The release notes state this version refactors the plugin by externalizing hast-util-minify-whitespace, but the provided code diff only shows a package.json version bump.
hast-util-minify-whitespace@1.0.0
This release introduces a new utility package, `hast-util-minify-whitespace@1.0.0`, which adds `minifyWhitespace(tree[, options])` to collapse and trim whitespace in a HAST tree, with optional newline-preservation via `options.newlines`. The provided GitHub release notes do not enumerate any changes beyond a compare link, so the actual behavioral and repository-level modifications are not explicitly documented there.
Featuresrehype-remove-comments@6.1.0
rehype-remove-comments@6.1.0 adds support for `test`, improving how the plugin can integrate with tooling that relies on plugin metadata. No other changes, bug fixes, or breaking behavior are mentioned in the provided release notes.
Featureshtml-enumerated-attributes@1.1.0
This release adds support for the HTML enumerated attribute named `shadowrootmode` to the attribute metadata map. In the code diff, `shadowrootmode` is implemented as a new entry in the `enumeratedAttributes` configuration with its own selector and allowed states.
Features7.0.0
Release 7.0.0 bumps the package ecosystem to a newer unified/rehype toolchain, requires Node.js 16, and switches packages to use the `exports` field. It also includes a major API break in `hast-util-from-string` by removing the return value, and removes `rehype-minify-doctype`. The code diff shows additional behavior changes in several `hast-util-*` helpers beyond what is described in the release notes.
Breakingrehype-minify-whitespace@5.0.1
rehype-minify-whitespace@5.0.1 is described as a small fix to avoid collapsing content inside <script> and <style>. The provided diff, however, shows a much broader set of changes across the monorepo, including many documentation and JSDoc/type-annotation updates, plus at least one behavioral guard change in a different rehype plugin.
rehype-minify-url@4.1.1
rehype-minify-url is released as version 4.1.1. The release notes claim a targeted fix related to handling `link[rel=canonical]` during URL minification.
rehype-minify-enumerated-attribute@4.1.0
The release notes for rehype-minify-enumerated-attribute@4.1.0 state three changes: externalizing the schema as html-enumerated-attributes, adding support for selectors, and updating to an improved schema. However, the provided code diff shows only a package.json version bump from 4.0.0 to 4.1.0, with no other code changes visible.
Features