Is there a network request for a Sveltekit endpoint during SSR. #5518
-
Hi, I have my <script context="module">
export const prerender = false;
export async function load({ fetch }) {
const data = await fetch('/xhr/foo');
return {
props: { data }
};
}
</script>
Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Per the docs, when using the
So the endpoint will be executed on the server without making another HTTP call. |
Beta Was this translation helpful? Give feedback.
Per the docs, when using the
fetch
provided by SvelteKit:So the endpoint will be executed on the server without making another HTTP call.