mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 04:22:01 +00:00
[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:
committed by
GitHub
parent
a4240e89e1
commit
8b036e97ea
@@ -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,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user