-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing changeset for @astrojs/prefetch (#3736)
- Loading branch information
Tony Sullivan
authored
Jun 27, 2022
1 parent
0bcc969
commit bd4dac0
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
``` |