diff --git a/.changeset/seven-crabs-burn.md b/.changeset/seven-crabs-burn.md new file mode 100644 index 0000000000..e1badd5dd0 --- /dev/null +++ b/.changeset/seven-crabs-burn.md @@ -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. diff --git a/packages/astro/client.d.ts b/packages/astro/client.d.ts index f81d652e38..3083247cfc 100644 --- a/packages/astro/client.d.ts +++ b/packages/astro/client.d.ts @@ -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; /** * This is set to the site option specified in your project’s Astro config file. */