Avatar for the withastro user
withastro
astro
BlogDocsChangelog

Performance History

Latest Results

fix(css): preserve styles for child components of client:only islands during build (#17292) Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
main
14 hours ago
fix(build): deduplicate CSS assets between prerender and SSR environments (#17488) * fix(build): deduplicate CSS assets between prerender and SSR environments In server output, the prerender and SSR environments each bundle shared layouts separately, emitting one CSS asset per environment for the same CSS source modules (e.g. `index.X.css` and `_..Y.css`). The prerender build now records its CSS asset filenames keyed by each chunk's CSS module set, and the SSR build renames its matching assets to the prerender filenames, so moving assets to the client directory yields a single file referenced by both page types. Keyed by module identity rather than content hash because plugins that scan the environment module graph (e.g. Tailwind) can produce slightly different content for the same CSS source in each environment. The rename mutates `asset.fileName` in place instead of re-keying the bundle object: the bundle is a Rolldown proxy that ignores direct key assignment, and the writer emits files based on `fileName`. Fixes #17298 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5TQ1y3yBEDx73tYTHoUBj * test: cover multi-page and unique-CSS cases for prerender/SSR dedup Extends the fixture with a second prerendered page, and a server-only page with its own stylesheet, asserting that all pages share one deduplicated file while CSS unique to a server-rendered page is still emitted and linked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5TQ1y3yBEDx73tYTHoUBj * chore: retrigger CI Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5TQ1y3yBEDx73tYTHoUBj --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
main
14 hours ago
Fix Container API build errors when using the Cloudflare adapter's workerd prerender environment (#17453) * fix: make Container API work with Cloudflare adapter's workerd prerender environment Three issues prevented the Container API from working in Cloudflare's workerd prerender environment: 1. Static satteri import: The config schema module (base.ts) had a static `import { satteri } from '@astrojs/markdown-satteri'` which got pulled into the prerender bundle via the Container API's import of ASTRO_CONFIG_DEFAULTS. With Cloudflare's 'browser' resolve condition, satteri resolved to its WASM browser entry requiring @napi-rs/wasm-runtime (not installed), causing a build-time failure. Fix: Extract ASTRO_CONFIG_DEFAULTS to a standalone defaults.ts module without the satteri import. The satteri default is now applied lazily in validate.ts during config resolution. 2. Node.js builtins: The Container API imported node:path (via posix.sep) and transitively pulled in esbuild (via client-directive/index.ts barrel export), which imports node:url. These Node.js built-in modules aren't available in workerd without nodejs_compat. Fix: Replace posix.sep with '/' (always the same value), import getDefaultClientDirectives from default.js directly instead of the barrel index.js, and remove the validateConfig call (which pulled in node:path/node:url through the schema resolution chain). 3. Prerender error masking: When Container API errors occurred in workerd, the error message (with newlines) was put into an HTTP header, which miniflare rejected as 'Invalid header value', masking the real error. Fix: Sanitize newlines from error messages before putting them in the x-astro-prerender-error header. Closes #17404 * Keep satteri as default markdown processor; container fix relies on defaults.ts split --------- Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
main
14 hours ago
Merge branch 'main' into fix-middleware-rewrite-404
fix-middleware-rewrite-404
14 hours ago
Merge branch 'main' into triagebot/fix-17293
triagebot/fix-17293
14 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
Render the custom 404 page when a middleware rewrite dead-ends in an empty 404#17284
14 hours ago
8c0f24b
fix-middleware-rewrite-404
CodSpeed Performance Gauge
0%
CodSpeed Performance Gauge
0%
Preserve styles for child components inside client:only islands during build#17292
14 hours ago
30b5f17
triagebot/fix-16119
© 2026 CodSpeed Technology
Home Terms Privacy Docs