in kit/svelteKitCustomClient/client.js [1285:1317]
function preload(element, priority) {
const a = find_anchor(element, container);
if (!a) return;
const { url, external, download } = get_link_info(a, base);
if (external || download) return;
const options = get_router_options(a);
if (!options.reload) {
if (priority <= options.preload_data) {
const intent = get_navigation_intent(/** @type {URL} */ (url), false);
if (intent) {
if (DEV) {
preload_data(intent).then((result) => {
if (result.type === "loaded" && result.state.error) {
console.warn(
`Preloading data for ${intent.url.pathname} failed with the following error: ${result.state.error.message}\n` +
"If this error is transient, you can ignore it. Otherwise, consider disabling preloading for this route. " +
"This route was preloaded due to a data-sveltekit-preload-data attribute. " +
"See https://kit.svelte.dev/docs/link-options for more info"
);
}
});
} else {
preload_data(intent);
}
}
} else if (priority <= options.preload_code) {
preload_code(get_url_path(/** @type {URL} */ (url)));
}
}
}