Skip to content

Commit 2e2d6b7

Browse files
authoredMay 14, 2024··
fix(astro): refine assets prefix typing (#11020)
1 parent 10739fc commit 2e2d6b7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎.changeset/seven-crabs-burn.md

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

‎packages/astro/client.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface ImportMetaEnv {
1212
/**
1313
* 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.
1414
*/
15-
readonly ASSETS_PREFIX: string;
15+
readonly ASSETS_PREFIX: string | Record<string, string>;
1616
/**
1717
* This is set to the site option specified in your project’s Astro config file.
1818
*/

0 commit comments

Comments
 (0)
Please sign in to comment.