From af870a70bc0ad01f21aae66dce2e6dbd463064b6 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Fri, 16 Feb 2024 23:51:55 +0100 Subject: [PATCH] Optimize astro.config.mjs --- astro.config.mjs | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 3355226..0da30a7 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -11,21 +11,36 @@ import mdx from "@astrojs/mdx"; // https://astro.build/config export default defineConfig({ - output: "static", image: { + output: "static", + image: { service: sharpImageService(), - }, compressHTML: true, site: "https://steamwar.de", integrations: [svelte(), tailwind({ - configFile: "./tailwind.config.cjs", - }), configureI18n(), sitemap({ - i18n: { - defaultLocale: "en", locales: { - en: "en-US", de: "de-DE", + }, + compressHTML: true, + site: "https://steamwar.de", + integrations: [ + svelte(), + tailwind({ + configFile: "./tailwind.config.cjs", + }), + configureI18n(), + sitemap({ + i18n: { + defaultLocale: "en", locales: { + en: "en-US", de: "de-DE", + }, }, - }, - }), robotsTxt({ - policy: [{ - userAgent: "*", disallow: ["/admin", "/login", "/dashboard", "/de", "/_astro"], - }], - }), mdx()], vite: { + }), + robotsTxt({ + policy: [{ + userAgent: "*", disallow: ["/admin", "/login", "/dashboard", "/de", "/_astro"], + }], + }), + mdx() + ], + experimental: { + contentCollectionCache: true, + }, + vite: { resolve: { alias: { "@components": path.resolve("./src/components"),