src/content/docs/en/reference/legacy-flags.mdx
import Since from '~/components/Since.astro'
To help some users migrate between versions of Astro, we occasionally introduce legacy flags.
These flags allow you to opt in to some deprecated or otherwise outdated behavior of Astro in the latest version, so that you can continue to upgrade and take advantage of new Astro releases until you are able to fully update your project code.
collectionsBackwardsCompatType: boolean
Default: false
The legacy.collectionsBackwardsCompat flag provides temporary backwards compatibility for projects unable to migrate to the Content Layer API introduced in v5.0.
export default defineConfig({
legacy: {
collectionsBackwardsCompat: true,
},
});
This flag preserves some legacy v4 content collections features:
type: 'content' and type: 'data' without loadersentry.slug and entry.render()This is a temporary migration helper. Migrate collections to the Content Layer API, then disable this flag.