Compress
The Compress integration for Astro brings compression utilities to Astro projects, allowing for automatic compression of CSS, HTML, SVG, JavaScript, and image files in the Astro outDir folder. This integration provides options to override default settings, filter files, control logging level, and more.
astro add Compress
npm install @astro/compress
Then apply the integration in astro.config.ts file.
// astro.config.ts
{
integrations: ['@astro/compress'],
}
The Compress integration for Astro provides a convenient way to compress CSS, HTML, SVG, JavaScript, and image files in an Astro project. With options for customization, logging control, and file filtering, developers can optimize their project build by integrating Compress in the project setup.