File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ defineProps<{
88 headingLevel? : ' h2' | ' h3'
99 /** Whether to show the publisher username */
1010 showPublisher? : boolean
11+ prefetch? : boolean
1112}>()
1213
1314function formatDate(dateStr : string ): string {
@@ -23,6 +24,7 @@ function formatDate(dateStr: string): string {
2324 <article class =" group card-interactive" >
2425 <NuxtLink
2526 :to =" `/package/${result.package.name}`"
27+ :prefetch-on =" prefetch ? 'visibility' : 'interaction'"
2628 class =" block focus:outline-none decoration-none"
2729 >
2830 <header class =" flex items-start justify-between gap-4 mb-2" >
Original file line number Diff line number Diff line change @@ -52,14 +52,6 @@ export default defineNuxtConfig({
5252 viteEnvironmentApi : true ,
5353 viewTransition : true ,
5454 typedPages : true ,
55- defaults : {
56- nuxtLink : {
57- prefetchOn : {
58- interaction : true ,
59- visibility : false ,
60- } ,
61- } ,
62- } ,
6355 } ,
6456
6557 compatibilityDate : '2024-04-03' ,
You can’t perform that action at this time.
0 commit comments