Avatar for the withastro user
withastro
astro
BlogDocsChangelog

Performance History

Latest Results

[ci] release
changeset-release/main
54 minutes ago
[ci] format
main
57 minutes ago
better comment wording
thelazylamaGit:astro-css-fix
2 hours ago
feat(session): add `session: false` to opt out of session support Adds a `session: false` config option that opts a project out of session support entirely, and tree-shakes the session runtime (`AstroSession` + `unstorage`) out of the SSR bundle for any project where no session driver is wired. - `session: false` is accepted by `SessionSchema` and threaded through so adapters skip auto-wiring their default driver (`@astrojs/cloudflare`, `@astrojs/netlify`, `@astrojs/node`). - When no driver will be present at request time — `session: false`, no `session` config at all, or a `session` object without a driver — `Astro.session` (and `context.session`) is `undefined`, matching its existing `AstroSession | undefined` type. This keeps the established `if (Astro.session)` feature-detection contract instead of throwing. - A new `astro:session-provider` Vite plugin swaps Astro's own `core/session/provider.js` for a runtime-free `provider-disabled.js` stub whenever no driver is wired, so Rollup drops `runtime.js` and `unstorage` from the bundle. Adapters wire their default driver during `astro:config:setup` (before `createVite`), so `config.session?.driver` reflects the final decision by resolve time — the same signal the driver virtual module uses. The swap is behavior-preserving: the real provider already resolves the session to `undefined` when no driver factory exists, so this only drops now-dead code. ```js title="astro.config.mjs" import { defineConfig } from 'astro/config'; export default defineConfig({ session: false, }); ``` Projects that already wire a session driver see no behavior change; the runtime is retained whenever a driver is configured.
adamchal:session-false
4 hours ago
comment placement
thelazylamaGit:astro-css-fix
4 hours ago
Merge branch 'main' into astro-css-fix
thelazylamaGit:astro-css-fix
4 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
[ci] release#17387
1 year ago
7dd340b
changeset-release/main
CodSpeed Performance Gauge
0%
2 hours ago
d0ae137
thelazylamaGit:astro-css-fix
CodSpeed Performance Gauge
-1%
5 hours ago
832840a
adamchal:session-false
© 2026 CodSpeed Technology
Home Terms Privacy Docs