Add astro-compress dependency

This commit is contained in:
prototypa
2024-01-27 12:31:53 -05:00
parent d7d7233641
commit 108bdd6201
2 changed files with 16 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import tailwind from '@astrojs/tailwind';
import mdx from '@astrojs/mdx'; import mdx from '@astrojs/mdx';
import partytown from '@astrojs/partytown'; import partytown from '@astrojs/partytown';
import icon from 'astro-icon'; import icon from 'astro-icon';
import compress from 'astro-compress';
import tasks from './src/utils/tasks'; import tasks from './src/utils/tasks';
import { readingTimeRemarkPlugin, responsiveTablesRehypePlugin } from './src/utils/frontmatter.mjs'; 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(), tasks(),
], ],

View File

@ -1,7 +1,7 @@
{ {
"name": "@onwidget/astrowind", "name": "@onwidget/astrowind",
"description": "AstroWind: A free template using Astro 4.0 and Tailwind CSS. Astro starter theme.", "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, "private": true,
"scripts": { "scripts": {
"dev": "astro dev", "dev": "astro dev",
@ -35,6 +35,7 @@
"@types/lodash.merge": "^4.6.9", "@types/lodash.merge": "^4.6.9",
"@typescript-eslint/eslint-plugin": "^6.19.0", "@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0", "@typescript-eslint/parser": "^6.19.0",
"astro-compress": "^2.2.8",
"eslint": "^8.56.0", "eslint": "^8.56.0",
"eslint-plugin-astro": "^0.31.3", "eslint-plugin-astro": "^0.31.3",
"eslint-plugin-jsx-a11y": "^6.8.0", "eslint-plugin-jsx-a11y": "^6.8.0",