diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-08-25 17:56:18 +0200 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-08-25 17:56:24 +0200 |
| commit | 4cac4f32a42c8f5a8490ed5018c30a279b1f5eb0 (patch) | |
| tree | ba1b15ac95dfa1c9153e044e20dc44c8a92f073e | |
| parent | 05713943f7dfeae0c064900dc27a21369b195e89 (diff) | |
Add compression plugin
| -rw-r--r-- | astro.config.mjs | 16 | ||||
| -rw-r--r-- | package-lock.json | 10 | ||||
| -rw-r--r-- | package.json | 1 |
3 files changed, 18 insertions, 9 deletions
diff --git a/astro.config.mjs b/astro.config.mjs index b4fe6c6..b57d952 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -6,17 +6,15 @@ import mdx from "@astrojs/mdx"; import icon from "astro-icon"; import rehypeExternalLinks from "rehype-external-links"; +import compressor from "astro-compressor"; + export default defineConfig({ compressHTML: true, site: "https://www.costas.dev", - integrations: [ - sitemap({ - priority: 0.5, - changefreq: "weekly", - }), - mdx(), - icon(), - ], + integrations: [sitemap({ + priority: 0.5, + changefreq: "weekly", + }), mdx(), icon(), compressor()], build: { assets: "assets", inlineStylesheets: "never", @@ -35,4 +33,4 @@ export default defineConfig({ ] ] } -}); +});
\ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 103ffb5..a1e26cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@fontsource/beiruti": "^5.2.5", "@iconify-json/tabler": "^1.2.19", "astro": "^5.13.2", + "astro-compressor": "^1.1.2", "astro-icon": "^1.1.5", "rehype-external-links": "^3.0.0", "typescript": "5.8.3" @@ -2494,6 +2495,15 @@ "sharp": "^0.33.3" } }, + "node_modules/astro-compressor": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/astro-compressor/-/astro-compressor-1.1.2.tgz", + "integrity": "sha512-BsX6ypOkRff2g7e5vA47Vlpq9MfVxAo4pXzfkJvXTSzzrSYvf8m3e0lbyGK6eReSzWcAPXymOTIoooqDX1BTlA==", + "license": "MIT", + "engines": { + "node": ">=22.15.0 <23.0.0 || >=23.8.0" + } + }, "node_modules/astro-icon": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/astro-icon/-/astro-icon-1.1.5.tgz", diff --git a/package.json b/package.json index 224526a..e469506 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@fontsource/beiruti": "^5.2.5", "@iconify-json/tabler": "^1.2.19", "astro": "^5.13.2", + "astro-compressor": "^1.1.2", "astro-icon": "^1.1.5", "rehype-external-links": "^3.0.0", "typescript": "5.8.3" |
