Astro Info
Astro v6.1.9
Node v24.13.0
System macOS (arm64)
Package Manager pnpm
Output server
Adapter @astrojs/netlify (v7.0.8)
Integrations @astrojs/react (v5.0.4)
@sanity/astro (v3.3.1)
@sentry/astro (v10.49.0)
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
With import.meta.env.ASSETS_PREFIX being marked as deprecated since v6, and marked for removal in v7. The recommendation is to: "Use build.assetsPrefix from astro:config/server instead.".
However, it seems that assetsPrefix isn't available from build at the moment.
I can see in the types for ServerDeserializedManifest that only 'server' | 'client' | 'format' are picked at properties for build.
|
export type ServerDeserializedManifest = Pick< |
|
SSRManifest, |
|
'base' | 'trailingSlash' | 'compressHTML' | 'site' |
|
> & |
|
DeserializedDirs & { |
|
i18n: AstroConfig['i18n']; |
|
build: Pick<AstroConfig['build'], 'server' | 'client' | 'format'>; |
|
root: URL; |
|
image: Pick<AstroConfig['image'], 'objectFit' | 'objectPosition' | 'layout'>; |
|
}; |
And also the virtual module only seems to create build with the same properties for build.
|
const build = { |
|
server: new URL(manifest.buildServerDir), |
|
client: new URL(manifest.buildClientDir), |
|
format: manifest.buildFormat, |
|
}; |
What's the expected result?
I'd expect the assetsPrefix to be available a property on build exposed from astro:config/server, given import.meta.env.ASSETS_PREFIX is marked as deprecated.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-xcvsfjqd?file=src%2Fpages%2Findex.astro
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
With
import.meta.env.ASSETS_PREFIXbeing marked as deprecated since v6, and marked for removal in v7. The recommendation is to: "Use build.assetsPrefix from astro:config/server instead.".However, it seems that
assetsPrefixisn't available frombuildat the moment.I can see in the types for
ServerDeserializedManifestthat only'server' | 'client' | 'format'are picked at properties forbuild.astro/packages/astro/src/types/public/manifest.ts
Lines 22 to 31 in 3740b24
And also the virtual module only seems to create build with the same properties for
build.astro/packages/astro/src/manifest/virtual-module.ts
Lines 117 to 121 in 3740b24
What's the expected result?
I'd expect the
assetsPrefixto be available a property onbuildexposed fromastro:config/server, givenimport.meta.env.ASSETS_PREFIXis marked as deprecated.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-xcvsfjqd?file=src%2Fpages%2Findex.astro
Participation