📦 SETUP • ⚙️ CONFIGURATION • ️️️🛰️ FEATURES
| An Astro integration to minify and mangle CSS class names across HTML, CSS, and JS files. Boost performance by reducing payload size and obfuscate your source code structure. |
bun i -D astro-class-shortenernpm i -D astro-class-shortenerpnpm i -D astro-class-shorteneryarn i -D astro-class-shortenerIn your astro.config.ts file add the following code in integrations:
import { defineConfig } from 'astro/config';
import { classShortener } from 'astro-class-shortener';
export default defineConfig({
integrations: [ classShortener() ]
});Extra settings that can be added.
import { defineConfig } from 'astro/config';
import { classShortener } from 'astro-class-shortener';
export default defineConfig({
integrations: [
classShortener({
// Exclude some classes to be renamed and shorted
exclude: [ 'is-active' ]
})
]
});BACK TO TOP
Copyright © All rights reserved developed by LuisdaByte and