diff --git a/astro.config.mjs b/astro.config.mjs index 551b684..a6e8971 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -8,6 +8,7 @@ import tailwind from '@astrojs/tailwind'; import mdx from '@astrojs/mdx'; import partytown from '@astrojs/partytown'; import icon from 'astro-icon'; +import compress from 'astro-compress'; import tasks from './src/utils/tasks'; import { readingTimeRemarkPlugin, responsiveTablesRehypePlugin } from './src/utils/frontmatter.mjs'; @@ -59,6 +60,19 @@ export default defineConfig({ }) ), + compress({ + CSS: true, + HTML: { + 'html-minifier-terser': { + removeAttributeQuotes: false, + }, + }, + Image: false, + JavaScript: true, + SVG: false, + Logger: 1, + }), + tasks(), ], diff --git a/package.json b/package.json index ea1937b..6a0861b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@onwidget/astrowind", "description": "AstroWind: A free template using Astro 4.0 and Tailwind CSS. Astro starter theme.", - "version": "1.0.0-beta.15", + "version": "1.0.0-beta.16", "private": true, "scripts": { "dev": "astro dev", @@ -35,6 +35,7 @@ "@types/lodash.merge": "^4.6.9", "@typescript-eslint/eslint-plugin": "^6.19.0", "@typescript-eslint/parser": "^6.19.0", + "astro-compress": "^2.2.8", "eslint": "^8.56.0", "eslint-plugin-astro": "^0.31.3", "eslint-plugin-jsx-a11y": "^6.8.0",