An Astro integration plugin that minifies Astro's custom data attributes (data-astro-cid-*) used for style scoping, reducing HTML and CSS file sizes by replacing long attribute names with shorter alternatives. Current version is 0.0.3. It provides two modes: 'prefix' which produces valid data attributes (e.g., data-0), and 'maximum' which uses bare base-36 numbers (e.g., a). Unlike manual find-and-replace, this plugin automatically handles the mapping between original and minified attributes across all HTML and CSS files. Note: only works with static exports; SSR is not supported.
npm install astro-id-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs and configures the Astro Id Minifier plugin with prefix mode and an exclude list, showing integration setup.
Ensure your Astro project uses output: 'static'.
Use 'prefix' mode for valid HTML attributes.
Use the 'exclude' option to list custom attributes that should be skipped.
Lock your version and review changelog before upgrading.
Use: import minifyId from 'astro-id-minifier'
Use: import type { MinifierOptions } from 'astro-id-minifier'Check peer dependencies; upgrade/downgrade Astro accordingly.
No dependency data recorded yet.