We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
block Astro v5.3.0 Node v22.12.0 System Windows (x64) Package Manager npm Output server Adapter none Integrations none
No response
In the following example only link a works.
All links work if top level await in Deferred.astro is removed.
astro.config.mjs
import { defineConfig } from 'astro/config'; // https://astro.build/config export default defineConfig({ output: 'server', prefetch: true });
index.astro
--- import Deferred from '../components/Deferred.astro'; --- <h1>Home</h1> <p>{new Date().toString()}</p> <Deferred server:defer link="/about-a"/> <Deferred link="/about-b"/>
Deferred.astro
--- const { link } = Astro.props; const getMsg = async () => { return new Promise ((resolve) => { setTimeout(() => { resolve(`This is the message for ${link}`); }, 100); }); } const res = await getMsg(); --- <a href={link} data-astro-prefetch>{link}</a>
about-a.astro about-b.astro
<h1>About</h1> <a href="/">Home</a>
Expect prefetch to work for both links, including the one with server:defer and top level-await.
https://stackblitz.com/edit/github-dzimzdt7
The text was updated successfully, but these errors were encountered:
I tried the reproduction, and the prefetching works as expected, which is the hover strategy.
Sorry, something went wrong.
No branches or pull requests
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
In the following example only link a works.
All links work if top level await in Deferred.astro is removed.
astro.config.mjs
index.astro
Deferred.astro
about-a.astro
about-b.astro
What's the expected result?
Expect prefetch to work for both links, including the one with server:defer and top level-await.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-dzimzdt7
Participation
The text was updated successfully, but these errors were encountered: