Enable prefetch and experimental client prerender in Astro config

The commit introduces prefetch in the Astro configuration to improve initial load speed. Additionally, it enables an experimental feature, clientPrerender, to potentially enhance rendering performance. Changes have been made keeping both functionality and performance improvements in mind.
This commit is contained in:
Emil Gulamov 2024-02-22 22:08:45 +04:00
parent 0d6284cfea
commit 982f6f081a

View file

@ -7,11 +7,15 @@ import compressor from "astro-compressor";
// https://astro.build/config
export default defineConfig({
// https://docs.astro.build/en/guides/images/#authorizing-remote-images
site: 'https://screwfast.uk',
image: {
domains: ["images.unsplash.com"],
},
site: 'https://screwfast.uk',
prefetch: true,
integrations: [tailwind(), sitemap(), compressor({ gzip: false, brotli: true })],
output: 'static',
experimental: {
clientPrerender: true
},
adapter: vercelStatic()
});