🐞 Patch Changes
-
#11213
94ac7efThanks @florian-lefebvre! - Removes thePUBLIC_prefix constraint forastro:envpublic variables -
#11213
94ac7efThanks @florian-lefebvre! - BREAKING CHANGE to the experimentalastro:envfeature onlyServer secrets specified in the schema must now be imported from
astro:env/server. UsinggetSecret()is no longer required to use these environment variables in your schema:import { getSecret } from 'astro:env/server'const API_SECRET = getSecret("API_SECRET")import { API_SECRET } from 'astro:env/server'Note that using
getSecret()with these keys is still possible, but no longer involves any special handling and the raw value will be returned, just like retrieving secrets not specified in your schema. -
#11234
4385bf7Thanks @ematipico! - Adds a new function calledaddServerRendererto the Container API. Use this function to manually store renderers inside the instance of your container.This new function should be preferred when using the Container API in environments like on-demand pages:
import type { APIRoute } from 'astro';import { experimental_AstroContainer } from 'astro/container';import reactRenderer from '@astrojs/react/server.js';import vueRenderer from '@astrojs/vue/server.js';import ReactComponent from '../components/button.jsx';import VueComponent from '../components/button.vue';// MDX runtime is contained inside the Astro coreimport mdxRenderer from 'astro/jsx/server.js';// In case you need to import a custom rendererimport customRenderer from '../renderers/customRenderer.js';export const GET: APIRoute = async (ctx) => {const container = await experimental_AstroContainer.create();container.addServerRenderer({ renderer: reactRenderer });container.addServerRenderer({ renderer: vueRenderer });container.addServerRenderer({ renderer: customRenderer });// You can pass a custom name toocontainer.addServerRenderer({name: 'customRenderer',renderer: customRenderer,});const vueComponent = await container.renderToString(VueComponent);return await container.renderToResponse(Component);}; -
#11249
de60c69Thanks @markgaze! - Fixes a performance issue with JSON schema generation -
#11242
e4fc2a0Thanks @ematipico! - Fixes a case where the virtual moduleastro:containerwasn’t resolved -
#11236
39bc3a5Thanks @ascorbic! - Fixes a case where symlinked content collection directories were not correctly resolved -
#11258
d996db6Thanks @ascorbic! - Adds a new errorRewriteWithBodyUsedthat throws whenAstro.rewriteis used after the request body has already been read. -
#11243
ba2b14cThanks @V3RON! - Fixes a prerendering issue for libraries innode_moduleswhen a folder with an underscore is in the path. -
#11244
d07d2f7Thanks @ematipico! - Improves the developer experience of the custom500.astropage in development mode.Before, in development, an error thrown during the rendering phase would display the default error overlay, even when users had the
500.astropage.Now, the development server will display the
500.astroand the original error is logged in the console. -
#11240
2851b0aThanks @ascorbic! - Ignores query strings in module identifiers when matching “.astro” file extensions in Vite plugin -
#11245
e22be22Thanks @bluwy! - Refactors prerendering chunk handling to correctly remove unused code during the SSR runtime