Sapper gives you the ability to preload that runs on both client and server side.
<script context="module">
export async function preload(page, session) {
const res = await this.fetch(`blog.json`);
const article = await res.json();
return { article };
}
</script>
How would I distinguish between a server side call and a client side call?
In Nuxt the context provides isServer and isClient to differentiate.
Is there one for sapper?