diff --git a/astro.config.mjs b/astro.config.mjs index 551b684..4838b18 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'; @@ -60,6 +61,15 @@ export default defineConfig({ ), tasks(), + + compress({ + CSS: true, + HTML: false, + Image: false, + JavaScript: true, + SVG: true, + Logger: 1, + }), ], image: { diff --git a/package.json b/package.json index d24af2c..36b7e4f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@onwidget/astrowind", "description": "AstroWind: A free template using Astro 3.0 and Tailwind CSS. Astro starter theme.", - "version": "1.0.0-beta.10", + "version": "1.0.0-beta.11", "private": true, "scripts": { "dev": "astro dev", @@ -19,6 +19,7 @@ "@astrolib/seo": "^1.0.0-beta.5", "@fontsource-variable/inter": "^5.0.16", "astro": "^4.0.6", + "astro-compress": "^2.2.5", "astro-icon": "1.0.0-next.2", "limax": "4.1.0", "lodash.merge": "^4.6.2", @@ -47,6 +48,10 @@ "tailwindcss": "^3.4.0", "typescript": "^5.3.3" }, + "resolutions": { + "astro/sharp": "0.33.1", + "astro-compress/sharp": "0.33.1" + }, "engines": { "node": ">=18.14.1" }