Minify class and id attribute values in HTML strings by renaming them to short, unique tokens. Version 0.4.0 is the latest stable release. The package has a low release cadence and minimal maintenance. It transforms class and id attributes in HTML, but does not update corresponding CSS selectors or JavaScript references, which is a common footgun.
npm install class-id-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates minifying class attribute values using the named import minify.
Post-process CSS and JS to replace old class/id names with new ones using a mapping returned by the minifier.
Extract and process style and script content separately.
Ensure class and id values are standard CSS identifiers (no spaces except between multiple classes).
Use dynamic import: const minifier = (await import('class-id-minifier')).default;Use import { minify } from 'class-id-minifier' instead of import minifier from ...No dependency data recorded yet.