mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
Add missing changeset for @astrojs/prefetch (#3736)
This commit is contained in:
parent
0bcc969cd4
commit
bd4dac0e1a
1 changed files with 19 additions and 0 deletions
19
.changeset/lovely-radios-grin.md
Normal file
19
.changeset/lovely-radios-grin.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
'@astrojs/prefetch': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Adds a new `@astrojs/prefetch` integration with the goal of adding near-instant page navigation for Astro projects. HTML and CSS for visible links marked with `rel="prefetch"` will be preloaded in the browser when the browser is idle.
|
||||||
|
|
||||||
|
__astro.config.mjs__
|
||||||
|
```js
|
||||||
|
import prefetch from '@astrojs/prefetch';
|
||||||
|
export default {
|
||||||
|
// ...
|
||||||
|
integrations: [prefetch()],
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!-- Prefetch HTML and stylesheets for the /products page -->
|
||||||
|
<a href="/products" rel="prefetch">All Products</a>
|
||||||
|
```
|
Loading…
Reference in a new issue