[READ-ONLY] a fast, modern browser for the npm registry
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf: prefetch on visibility by default

+2 -8
+2
app/components/PackageCard.vue
··· 8 8 headingLevel?: 'h2' | 'h3' 9 9 /** Whether to show the publisher username */ 10 10 showPublisher?: boolean 11 + prefetch?: boolean 11 12 }>() 12 13 13 14 function formatDate(dateStr: string): string { ··· 23 24 <article class="group card-interactive"> 24 25 <NuxtLink 25 26 :to="`/package/${result.package.name}`" 27 + :prefetch-on="prefetch ? 'visibility' : 'interaction'" 26 28 class="block focus:outline-none decoration-none" 27 29 > 28 30 <header class="flex items-start justify-between gap-4 mb-2">
-8
nuxt.config.ts
··· 52 52 viteEnvironmentApi: true, 53 53 viewTransition: true, 54 54 typedPages: true, 55 - defaults: { 56 - nuxtLink: { 57 - prefetchOn: { 58 - interaction: true, 59 - visibility: false, 60 - }, 61 - }, 62 - }, 63 55 }, 64 56 65 57 compatibilityDate: '2024-04-03',