[frameworks] Add default immutable cache path for Astro v2 (#9305)

Astro v2 was released today. It includes [improved support for caching
all hashed build
assets](https://docs.astro.build/en/guides/upgrade-to/v2/#changed-_astro-folder-for-build-assets)
by gathering these all in a single `_astro` directory in build output
(previously these ended up in a number of different places).

This PR updates the Vercel frameworks config to provide out-of-the-box
immutable caching for these assets.

Co-authored-by: Steven <steven@ceriously.com>
This commit is contained in:
Chris Swithinbank
2023-01-25 01:05:13 +01:00
committed by GitHub
parent a4240e89e1
commit 8b036e97ea

View File

@@ -272,6 +272,11 @@ export const frameworks = [
headers: { 'cache-control': 'public, max-age=31536000, immutable' },
continue: true,
},
{
src: '^/_astro/(.*)$',
headers: { 'cache-control': 'public, max-age=31536000, immutable' },
continue: true,
},
],
},
{