0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

fix(astro): refine assets prefix typing (#11020)

This commit is contained in:
Alexander S 2024-05-14 01:40:52 -07:00 committed by GitHub
parent 10739fc3de
commit 2e2d6b7442
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"astro": patch
---
Add type declarations for `import.meta.env.ASSETS_PREFIX` when defined as an object for handling different file types.

View file

@ -12,7 +12,7 @@ interface ImportMetaEnv {
/**
* The prefix for Astro-generated asset links if the build.assetsPrefix config option is set. This can be used to create asset links not handled by Astro.
*/
readonly ASSETS_PREFIX: string;
readonly ASSETS_PREFIX: string | Record<string, string>;
/**
* This is set to the site option specified in your projects Astro config file.
*/