0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/.changeset/sixty-laws-argue.md
Bjorn Lu 38e21d1275
Support prefetch in core (#8951)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-11-08 22:07:18 +08:00

739 B

astro
minor

Prefetching is now supported in core

You can enable prefetching for your site with the prefetch: true config. It is enabled by default when using View Transitions and can also be used to configure the prefetch behaviour used by View Transitions.

You can enable prefetching by setting prefetch:true in your Astro config:

// astro.config.js
import { defineConfig } from 'astro/config';

export default defineConfig({
  prefetch: true
})

This replaces the @astrojs/prefetch integration, which is now deprecated and will eventually be removed. Visit the Prefetch guide for more information.