|
|
@ -72,10 +72,10 @@ export function usePrefetch() {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
rIC(() => {
|
|
|
|
rIC(() => {
|
|
|
|
document.querySelectorAll('.vitepress-content a').forEach((link) => {
|
|
|
|
document.querySelectorAll('#app a').forEach((link) => {
|
|
|
|
const { target, hostname, pathname } = link as HTMLAnchorElement
|
|
|
|
const { target, hostname, pathname } = link as HTMLAnchorElement
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
// only prefetch same page navigation, since a new page will load
|
|
|
|
// only prefetch same tab navigation, since a new tab will load
|
|
|
|
// the lean js chunk instead.
|
|
|
|
// the lean js chunk instead.
|
|
|
|
target !== `_blank` &&
|
|
|
|
target !== `_blank` &&
|
|
|
|
// only prefetch inbound links
|
|
|
|
// only prefetch inbound links
|
|
|
|