Minifies HTML attribute class names, IDs, and data-* attributes coordinated across HTML, CSS, and JS files. v1.0.2 (stable). Useful for additional minification or obfuscation beyond standard minifiers. Processes files via AST parsers and updates references in HTML, CSS, and JavaScript. Built by the Roosevelt framework team but usable standalone. Requires Node >=18.
npm install minify-html-attributesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates coordinated minification of class and ID attributes across HTML, CSS, and JS strings.
Simplify DOM manipulation code; avoid dynamic references when possible.
Ensure input is valid HTML/CSS; preprocess templates if needed.
Upgrade Node.js to version 18 or later.
Run standard minifier after this package.
Use ES module import syntax (import { minifyHtmlAttributes } from 'minify-html-attributes') or enable ESM in your project.Ensure options contains at least an html, css, or js property with valid strings.
Validate CSS syntax; remove unsupported constructs or preprocess with a CSS linter.
No dependency data recorded yet.