I recently upgraded this site from Astro 4 to Astro 6 - two major versions in one go. Here’s what actually broke and how I fixed it.
Astro 6 dropped support for several things that were deprecated in Astro 5:
Astro.glob() - removed entirely. The replacement is Vite’s import.meta.glob() with { eager: true }.<ViewTransitions /> - renamed to <ClientRouter /> in Astro 5 and removed in Astro 6.export const get must now be export const GET.Astro.glob()Before:
const allPosts = await Astro.glob('./**/*.md')
After:
const allPosts = Object.values(import.meta.glob('./**/*.md', { eager: true }))
The { eager: true } option makes the import synchronous, so the function no longer needs to be async. The returned module objects have the same frontmatter, url, and rawContent() shape as before.
<ViewTransitions />Before:
import { ViewTransitions } from 'astro:transitions'
...
<ViewTransitions />
After:
import { ClientRouter } from 'astro:transitions'
...
<ClientRouter />
Astro 6 requires uppercase HTTP method names for API routes:
// Before
export const get = () => rss({ ... })
// After
export const GET = () => rss({ ... })
Yes. The build is noticeably faster and the new defaults are sensible. The migration itself took less than an hour since the codebase was already avoiding most deprecated patterns.