withastro / roadmap

Ideas, suggestions, and formal RFC proposals for the Astro project.
290 stars 29 forks source link

Support prefetch in core #754

Closed bluwy closed 9 months ago

bluwy commented 10 months ago

Summary

Deprecate @astrojs/prefetch and provide first-class prefetch support in Astro.

Background & Motivation

With the introduction of View Transitions, it includes partial prefetching code for snappy navigation between pages. We can take this opportunity to support prefetching in core, and share the prefetch behaviour with View Transitions.

I've started an implementation before an RFC as the initial plan was to simply move @astrojs/prefetch to core. However, it would also be a good time to polish up and extend the API.

Goals

Non-Goals

NOTE: Stage 2 does not mention solution details, but I've written one in the discussion: https://github.com/withastro/astro/pull/8951

bluwy commented 9 months ago

Closing as the stage 3 RFC has been merged.